switch to use new K8s control-plane label

The node-role.kubernetes.io/master= label is being deprecated and is
being replaced by node-role.kubernetes.io/control-plane=

Similarly the node-role.kubernetes.io/master:NoSchedule taint is being
replaced by node-role.kubernetes.io/control-plane:NoSchedule

We need to update the code appropriately.  We can switch to the new
label since it's already available, but where we have a toleration for
the existing taint we need to keep the existing toleration and add
another one for what will be the new taint.

This updates the code for several separate helm charts.  Note that the
node-feature-discovery chart uses affinity rather than nodeSelector to
direct the pods toward the control-plane nodes.

Also, the fm-rest-api helm chart is not currently used by any
applications in this version of StarlingX so it will be validated by
code inspection only.

Test Plan:
PASS: with both controller nodes having both taints applied, verify
      that the node-feature-discovery and secret-observer pods were
      able to run on controller nodes.

Story: 2010301
Task: 46576

Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
Change-Id: I57626f90b4b1209250c0c5994452779857a01f80
This commit is contained in:
Chris Friesen 2022-10-14 19:03:34 -04:00
parent b34b868801
commit f27a44897b
3 changed files with 14 additions and 1 deletions

View File

@ -299,6 +299,9 @@ pod:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
mounts:
fm_rest_api:
init_container: null

View File

@ -56,6 +56,10 @@ master:
operator: "Equal"
value: ""
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Equal"
value: ""
effect: "NoSchedule"
annotations: {}
@ -68,6 +72,12 @@ master:
- key: "node-role.kubernetes.io/master"
operator: In
values: [""]
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/control-plane"
operator: In
values: [""]
worker:
configmapName: nfd-worker-conf

View File

@ -20,7 +20,7 @@ serviceAccount:
cronSchedule: "0 1 * * *"
nodeSelector:
node-role.kubernetes.io/master: ""
node-role.kubernetes.io/control-plane: ""
jobs:
startingDeadlineSeconds: 200