From f27a44897bd9abe12347a7ecfa5b355743a84395 Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Fri, 14 Oct 2022 19:03:34 -0400 Subject: [PATCH] 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 Change-Id: I57626f90b4b1209250c0c5994452779857a01f80 --- .../fm-rest-api/helm-charts/fm-rest-api/values.yaml | 3 +++ .../helm-charts/node-feature-discovery/values.yaml | 10 ++++++++++ .../helm-charts/secret-observer/values.yaml | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fm-rest-api/fm-rest-api/helm-charts/fm-rest-api/values.yaml b/fm-rest-api/fm-rest-api/helm-charts/fm-rest-api/values.yaml index 0ac1c6a..101a870 100644 --- a/fm-rest-api/fm-rest-api/helm-charts/fm-rest-api/values.yaml +++ b/fm-rest-api/fm-rest-api/helm-charts/fm-rest-api/values.yaml @@ -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 diff --git a/node-feature-discovery/node-feature-discovery/helm-charts/node-feature-discovery/values.yaml b/node-feature-discovery/node-feature-discovery/helm-charts/node-feature-discovery/values.yaml index 5546128..1adc697 100644 --- a/node-feature-discovery/node-feature-discovery/helm-charts/node-feature-discovery/values.yaml +++ b/node-feature-discovery/node-feature-discovery/helm-charts/node-feature-discovery/values.yaml @@ -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 diff --git a/secret-observer/secret-observer/helm-charts/secret-observer/values.yaml b/secret-observer/secret-observer/helm-charts/secret-observer/values.yaml index e794358..02ec434 100644 --- a/secret-observer/secret-observer/helm-charts/secret-observer/values.yaml +++ b/secret-observer/secret-observer/helm-charts/secret-observer/values.yaml @@ -20,7 +20,7 @@ serviceAccount: cronSchedule: "0 1 * * *" nodeSelector: - node-role.kubernetes.io/master: "" + node-role.kubernetes.io/control-plane: "" jobs: startingDeadlineSeconds: 200