Migrate to priorityClassName API
When I tried to install the latest ccm.yaml onto a new Hetzner node running latest k3s + 1.22.7 I was surprised to get the following warning:
$ kubectl apply -f https://github.com/hetznercloud/hcloud-cloud-controller-manager/releases/latest/download/ccm.yaml
serviceaccount/cloud-controller-manager created
clusterrolebinding.rbac.authorization.k8s.io/system:cloud-controller-manager created
Warning: spec.template.metadata.annotations[scheduler.alpha.kubernetes.io/critical-pod]: non-functional in v1.16+; use the "priorityClassName" field instead
deployment.apps/hcloud-cloud-controller-manager created
This simple PR attempts to use the recommended replacement API.
Because the critical-pod annotation is non functional in v1.16+, but we still want to specify how important this pod is, we set priorityClassName to system-cluster-critical. This should have a similar effect as before, AFAICT.
NB: I haven't tested this on any version of k8s beyond v1.22.7.
$ kubectl apply -f deploy/ccm.yaml
serviceaccount/cloud-controller-manager unchanged
clusterrolebinding.rbac.authorization.k8s.io/system:cloud-controller-manager unchanged
deployment.apps/hcloud-cloud-controller-manager configured
This PR has been marked as stale because it has not had recent activity. The bot will close the PR if no further action occurs.
got the same warning. will this be merged?
Hey @onpaws thank you!
You're welcome 🎉