kubeplus
kubeplus copied to clipboard
Migration to Kubernetes 1.22
As of 1.22 version of Kubernetes [1][2], following API related changes need to be made to KubePlus
Mutating Webhook Helper
- Change the admissionregistrationclient to v1 from v1beta1 https://github.com/cloud-ark/kubeplus/blob/master/mutating-webhook-helper/webhook-helper.go#L16
- Change apiextensionsclientset to v1 from v1beta1
Mutating Webhook:
- webhook.go -> change admissionregistrationv1beta1 to v1
- types.go -> change apiextensionsclientset to v1
- utils.go -> change apiextensionsclientset to v1
Platform Controller:
- apiextensionsv1beta1 -> change apiextensionsv1beta1 to v1
- apiextensionsclientset -> change apiextensionsclientset to v1
deploy:
- Change mutatingwebhook.yaml to v1 MutatingWebhookConfiguration
- Change mutatingwebook-ca-bundle.yaml
- Change kubeplus-non-pod-resources.yaml
- change spec.version to spec.versions
- add structural schema validation (spec.versions[*].schema.openAPIV3Schema) for each CRD.
- Note that we will have to update the Platform Controller as well to define these fields as part of registering the client API.
- Change CertificateSigningRequest in webhook-create-signed-cert-new.sh
- Update CertificateSigningRequest in webhook-create-signed-cert.sh
Kubediscovery:
- Change discovery.go (https://github.com/cloud-ark/kubediscovery/blob/master/pkg/discovery/discovery.go#L17)
- Change operatordocs.go (https://github.com/cloud-ark/kubediscovery/blob/master/pkg/discovery/operatordocs.go#L11)
README:
- Change reference to Kubernetes version (e.g.: https://github.com/cloud-ark/kubeplus#try)
Testing: In order to test the changes we will have to spin up Kubernetes version 1.22 and try KubePlus on it. Using Vagrant setup with freshly cloned copies of kubePlus and kubediscovery repo is a good option for this. Check the steps here: https://cloud-ark.github.io/kubeplus/docs/html/html/compile-components.html#work-on-the-code
Reference: [1] https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22 [2] https://github.com/cloud-ark/kubeplus/issues/930