Use control-plane label for nodeSelector and Tolerations

Upstream has deprecated 'node-role.kubernetes.io/master'
to use 'node-role.kubernetes.io/control-plane' in k8s 1.24.

Platform and applications need to be updated to use 'control-plane'
with nodeSelector/Tolerations so we may upgrade from 'master'.

This updates pod nodeSelector to use
'node-role.kubernetes.io/control-plane' instead of
'node-role.kubernetes.io/master'.

This updates pod Tolerations to support both:
- 'node-role.kubernetes.io/master'
- 'node-role.kubernetes.io/control-plane'

Test Plan:
PASS: In standard lab with additional "control-plane" taint on
      controller-1, add ptp notification and registration labels and
      ensure that ptp pods run on controller-1.

Story: 2010301
Task: 46669

Signed-off-by: Saba Touheed Mujawar <sabatouheed.mujawar@windriver.com>
Change-Id: I5a4bb2ea3d68431a8a20906fcd8d9675b43a11b2
This commit is contained in:
Saba Touheed Mujawar 2022-10-25 09:25:09 -04:00 committed by Chris Friesen
parent 4f11b4e402
commit d69d479915
2 changed files with 6 additions and 0 deletions

View File

@ -223,3 +223,6 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"

View File

@ -27,6 +27,9 @@ spec:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
{{- if .Values.registration.affinity }}
affinity:
{{ toYaml .Values.registration.affinity | indent 8 }}