From 9ef1523acfb0c0eda2174c3cd82627c1b271e768 Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Wed, 6 Mar 2024 21:54:30 +0300 Subject: [PATCH] Add node affinity Signed-off-by: v.oleynikov --- templates/agent/daemonset.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/templates/agent/daemonset.yaml b/templates/agent/daemonset.yaml index 67b8dd02..eb762089 100644 --- a/templates/agent/daemonset.yaml +++ b/templates/agent/daemonset.yaml @@ -18,8 +18,25 @@ spec: spec: {{- include "helm_lib_priority_class" (tuple . "cluster-medium") | nindent 6 }} {{- include "helm_lib_tolerations" (tuple . "any-node" "storage-problems") | nindent 6 }} - nodeSelector: - storage.deckhouse.io/sds-drbd-node: "" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: storage.deckhouse.io/sds-replicated-volume-node + operator: In + values: + - "" + - matchExpressions: + - key: storage.deckhouse.io/sds-local-volume-node + operator: In + values: + - "" + - matchExpressions: + - key: storage.deckhouse.io/sds-drbd-node + operator: In + values: + - "" imagePullSecrets: - name: {{ .Chart.Name }}-module-registry serviceAccountName: sds-node-configurator