Skip to content

Commit

Permalink
deprecation:Optional(stage: alpha) Community Operator bundle validator (
Browse files Browse the repository at this point in the history
#5414)

Signed-off-by: Camila Macedo <[email protected]>
  • Loading branch information
camilamacedo86 authored Dec 3, 2021
1 parent d56d3d7 commit eca076d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
16 changes: 16 additions & 0 deletions changelog/fragments/deprecation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Deprecation of the Optional(stage: alpha) Community Operator bundle validation. Its checks were moved to the [external validator](https://github.com/redhat-openshift-ecosystem/ocp-olm-catalog-validator/).
# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "deprecation"
# Is this a breaking change?
breaking: false
8 changes: 7 additions & 1 deletion internal/cmd/operator-sdk/bundle/validate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This validator allows check the bundle against an specific Kubernetes cluster ve
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub --optional-values=k8s-version=1.22
To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
[Deprecated] To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
$ operator-sdk bundle validate ./bundle --select-optional name=community --optional-values=index-path=bundle.Dockerfile
Expand Down Expand Up @@ -125,6 +125,12 @@ func NewCmd() *cobra.Command {
return nil
}

if c.selectorRaw == "name=community" {
logger.Warnf("The Optional(stage: alpha) Community Operator bundle validator is deprecated and" +
" will be removed in a future release. You can do these checks using the external validator: " +
"https://github.com/redhat-openshift-ecosystem/ocp-olm-catalog-validator/")
}

result, err := c.run(logger, args[0])
if err != nil {
logger.Fatal(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This validator allows check the bundle against an specific Kubernetes cluster ve
$ operator-sdk bundle validate ./bundle --select-optional name=operatorhub --optional-values=k8s-version=1.22
To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
[Deprecated] To validate a bundle against the (alpha) validator for Community Operators specifically, in addition to required bundle validators:
$ operator-sdk bundle validate ./bundle --select-optional name=community --optional-values=index-path=bundle.Dockerfile
Expand Down

0 comments on commit eca076d

Please sign in to comment.