Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The v1beta1 klusterlet CRD is invalid #192

Open
zhujian7 opened this issue Dec 2, 2022 · 2 comments
Open

The v1beta1 klusterlet CRD is invalid #192

zhujian7 opened this issue Dec 2, 2022 · 2 comments

Comments

@zhujian7
Copy link
Member

zhujian7 commented Dec 2, 2022

The klusterlet CRD generated for kubernetes cluster which's version is <=1.16 is invalid

If we apply this CRD to a 1.16.3 kubernetes cluster, will get:

# kubectl apply -f operator/v1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml
The CustomResourceDefinition "klusterlets.operator.open-cluster-management.io" is invalid:
* spec.validation.openAPIV3Schema.properties[spec].properties[registrationConfiguration].properties[featureGates].items.properties[mode].default: Forbidden: must not be set
* spec.validation.openAPIV3Schema.properties[spec].properties[workConfiguration].properties[featureGates].items.properties[mode].default: Forbidden: must not be set

Another validation result from GitHub action

@zhujian7
Copy link
Member Author

zhujian7 commented Dec 2, 2022

I am considering if we can remove the default value of the feature gate like this, but it will be a dangerous change.
If you are using the featureGates configuration and no mode is configured, you will be hit. E.g:

spec:
   registrationConfiguration:
     featureGates:
     - feature: DefaultClusterSet
        mode: Enable
     - feature: V1beta1CSRAPICompatibility   # no mode configured

So we are very cautious about this change and want to know if anyone uses it like 👆🏻 this.

This will not impact the upgrading, all existing clustermanager/klusterlet on the cluster must already have the mode value Disable. But for the new creating clustermanager/klusterlet, it is required to specify the mode value explicitly.

@zhujian7
Copy link
Member Author

zhujian7 commented Dec 2, 2022

cc @ivan-cai Any concerns, suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant