diff --git a/changelog/fragments/deprecation.yaml b/changelog/fragments/deprecation.yaml new file mode 100644 index 00000000000..c3c863952a4 --- /dev/null +++ b/changelog/fragments/deprecation.yaml @@ -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 diff --git a/internal/cmd/operator-sdk/bundle/validate/cmd.go b/internal/cmd/operator-sdk/bundle/validate/cmd.go index e5137744fae..a5e9123d5ff 100644 --- a/internal/cmd/operator-sdk/bundle/validate/cmd.go +++ b/internal/cmd/operator-sdk/bundle/validate/cmd.go @@ -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 @@ -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) diff --git a/website/content/en/docs/cli/operator-sdk_bundle_validate.md b/website/content/en/docs/cli/operator-sdk_bundle_validate.md index fbfae26c5e4..d162efb6b0b 100644 --- a/website/content/en/docs/cli/operator-sdk_bundle_validate.md +++ b/website/content/en/docs/cli/operator-sdk_bundle_validate.md @@ -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