v1.14.0
Upgrade K8s versions to use 1.22 (golang/v3)
Note that to ensure the backwards compatibility SDK tool will try to downgrade the versions used if you need to still scaffold the v1beta1 for CRDs and Webhooks to publish your solutions into older cluster versions. However, note that this version is no longer supported in Kubernetes 1.22+, sigs.k8s.io/controller-runtime v0.10.0 or controller-gen v0.7.0.
Following are the changes to be addressed in your Makefile and go.mod file if you are not using the v1beta1 K8s APIs which are no longer supported from k8s 1.22 version.
-
Update your
go.modfile to upgrade the dependencies and rungo mod tidyto download thenk8s.io/api v0.22.1 k8s.io/apimachinery v0.22.1 k8s.io/client-go v0.22.1 sigs.k8s.io/controller-runtime v0.10.0 -
Update your Makefile by making the following replacements:
- ENVTEST_K8S_VERSION = 1.21 + ENVTEST_K8S_VERSION = 1.22- $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases -
Remove from the
MakefiletheCRD_OPTIONS, see below:# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" -
Replace your
admissionReviewVersions={v1,v1beta1}markers withadmissionReviewVersions=v1 -
Run
make manifestto re-generate your manifests with latest versions.
See #5228 for more details.
For Ansible-based Operators, update ansible collection community.kubernetes to kubernetes.core
Add the kubernetes.core collection (>= 2.2.0) to the requrements.yml file
- name: kubernetes.core version: “2.2.0”
See #5249 for more details.