From 442c7d1875cf009ff13079ff8f5f800212a74ca2 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Fri, 13 Nov 2020 06:14:46 -0500 Subject: [PATCH] master:worker use case After #31 three node cluster, where all nodes will have the master and worker(or node for vanilla clusters) labels are just getting the nfd-master daemonset deployed. Since they have the master label, the NFD workers will not be scheduled. Discussion started in a downstream distribution of NFD: https://github.com/openshift/cluster-nfd-operator/issues/109 This Patch fix that, by adding support for master:worker type of nodes, modifying the nodeAffinity rules on the nfd-worker daemonSet to allow any node with the "node" label (independent if it is a master also) to get scheduled Signed-off-by: Carlos Eduardo Arango Gutierrez --- assets/worker/0700_worker_daemonset.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/worker/0700_worker_daemonset.yaml b/assets/worker/0700_worker_daemonset.yaml index 710bfcfa..03a45ff6 100644 --- a/assets/worker/0700_worker_daemonset.yaml +++ b/assets/worker/0700_worker_daemonset.yaml @@ -14,15 +14,18 @@ spec: app: nfd-worker spec: tolerations: - - operator: "Exists" - effect: "NoSchedule" + - operator: "Exists" + effect: "NoSchedule" affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - - matchExpressions: - - key: node-role.kubernetes.io/master - operator: DoesNotExist + - matchExpressions: + - key: node-role.kubernetes.io/master + operator: DoesNotExist + - matchExpressions: + - key: node-role.kubernetes.io/node + operator: Exists hostNetwork: true serviceAccount: nfd-worker readOnlyRootFilesystem: true