Description of problem: If CSV sets spec.customresourcedefinitions.owned.specDescriptors.value to any string, InstallPlan fails. Version-Release number of selected component (if applicable): release-4.4 OLM version: 0.13.0 git commit: 2187d3e8c5a1bf949bd9d9e0a819ed8f9ecd8860 Steps to Reproduce: 1. CSV has spec.customresourcedefinitions.owned.specDescriptors.value = a string. See https://github.com/operator-framework/community-operators/blob/master/upstream-community-operators/couchbase-enterprise/1.2.1/couchbase-v1.2.1.clusterserviceversion.yaml#L111 2. Create subscription using this CSV. Actual results: E0114 16:52:03.701658 1 queueinformer_operator.go:282] sync "openshift-operators" failed: Operation cannot be fulfilled on subscriptions.operators.coreos.com "couchbase-enterprise-certified": the object has been modified; please apply your changes to the latest version and try again E0114 16:52:04.907712 1 queueinformer_operator.go:282] sync {"update" "openshift-operators/install-9ggj5"} failed: error creating csv couchbase-operator.v1.2.1: ClusterServiceVersion.operators.coreos.com "couchbase-operator.v1.2.1" is invalid: spec.customresourcedefinitions.owned.specDescriptors.value: Invalid value: "": spec.customresourcedefinitions.owned.specDescriptors.value in body must be of type byte: "" Expected results: InstallPlan Succeeds. Additional info: * Issue only occurs on release-4.4 with spec.customresourcedefinitions.owned.specDescriptors.value. * Issue does not occur on release-4.2 or release-4.3. * Issue does not occur on spec.customresourcedefinitions.owned.statusDescriptors.value.
This is not a bug, but rather because of the enforcement of the structural Schemas. We need to make sure the **type** of values matches expectations. https://kubernetes.io/blog/2019/06/20/crd-structural-schema/ The Old Operators's CSV needs to be updated to be deployed on the 4.4 clusters. The type of the specDescriptor value is []byte/ json.rawmessage. See below: https://github.com/operator-framework/operator-lifecycle-manager/blob/372a68604a028eb9c0d61ce7beda0bf948ba11a6/pkg/api/apis/operators/v1alpha1/clusterserviceversion_types.go#L94