hcloud-cloud-controller-manager icon indicating copy to clipboard operation
hcloud-cloud-controller-manager copied to clipboard

Migrate to priorityClassName API

Open onpaws opened this issue 3 years ago • 1 comments

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

More

onpaws avatar Apr 19 '22 21:04 onpaws

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.

github-actions[bot] avatar Jun 19 '22 12:06 github-actions[bot]

got the same warning. will this be merged?

axgkl avatar Aug 18 '22 12:08 axgkl

Hey @onpaws thank you!

You're welcome 🎉

onpaws avatar Sep 19 '22 10:09 onpaws