operator: 1.5 -> 1.6 upgrade fails due to invalid CRD spec
Describe the bug When applying the vanilla operator 1.6 manifest over an existing operator 1.5 install,
Name: "knativeeventings.operator.knative.dev", Namespace: ""
for: "./infrastructure/cluster-base/kn-operator.yaml": CustomResourceDefinition.apiextensions.k8s.io "knativeeventings.operator.knative.dev" is invalid: [spec.conversion.webhookClientConfig: Forbidden: should not be set when strategy is not set to Webhook, spec.conversion.conversionReviewVersions: Forbidden: should not be set when strategy is not set to Webhook, status.storedVersions[0]: Invalid value: "v1alpha1": must appear in spec.versions]```
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomResourceDefinition"
Name: "knativeservings.operator.knative.dev", Namespace: ""
for: "./infrastructure/cluster-base/kn-operator.yaml": CustomResourceDefinition.apiextensions.k8s.io "knativeservings.operator.knative.dev" is invalid: [spec.conversion.webhookClientConfig: Forbidden: should not be set when strategy is not set to Webhook, spec.conversion.conversionReviewVersions: Forbidden: should not be set when strategy is not set to Webhook, status.storedVersions[0]: Invalid value: "v1alpha1": must appear in spec.versions]
Kube 1.22 Client Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.4”, GitCommit:“b695d79d4f967c403a96986f1750a35eb75e75f1”, GitTreeState:“clean”, BuildDate:“2021-11-17T15:48:33Z”, GoVersion:“go1.16.10”, Compiler:“gc”, Platform:“darwin/amd64”} Server Version: version.Info{Major:“1”, Minor:“22+”, GitVersion:“v1.22.9-eks-a64ea69”, GitCommit:“540410f9a2e24b7a2a870ebfacb3212744b5f878”, GitTreeState:“clean”, BuildDate:“2022-05-12T19:15:31Z”, GoVersion:“go1.16.15”, Compiler:“gc”, Platform:“linux/amd64”}
Expected behavior 1.6 applies cleanly
To Reproduce kubectl apply -f release manifests.
Knative release version Existing: 1.5.1 Attempting 1.6
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
Good news! I have upgraded to
v1.5.2and it looks like thestoredVersionsare in fact set to onlyv1beta1. As such I believe that I am mistaken and this fix should work (I guess that I’m confused about howstoredVersionsin a CRD is updated). I should be able to rollout to all clusters today and then re-test the upgrade tov1.6.0.@tshak You can try to install https://github.com/knative/operator/releases/tag/knative-v1.5.2 to see how it goes.
A key good indicator is that when you check the CRDs of servings and eventings, you should find only v1beta1 in the status.storageversion.
If everything seems fine: operator is running, CRs are running good, knative components are running fine, etc, install the https://github.com/knative/operator/releases/tag/knative-v1.6.0.