From 1f6a3b4e632cbc6b80e3faf06cd683ac21f78ef2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Henning?= <soeren.henning@email.uni-kiel.de>
Date: Mon, 22 Nov 2021 18:55:36 +0100
Subject: [PATCH] Add nodeSelector option to Theodolite Helm chart

---
 helm/templates/theodolite/random-scheduler/deployment.yaml | 4 ++++
 helm/templates/theodolite/theodolite-operator.yaml         | 4 ++++
 helm/values.yaml                                           | 3 +++
 3 files changed, 11 insertions(+)

diff --git a/helm/templates/theodolite/random-scheduler/deployment.yaml b/helm/templates/theodolite/random-scheduler/deployment.yaml
index 55b6e4ad5..132c5dcf8 100644
--- a/helm/templates/theodolite/random-scheduler/deployment.yaml
+++ b/helm/templates/theodolite/random-scheduler/deployment.yaml
@@ -27,4 +27,8 @@ spec:
           env:
             - name: TARGET_NAMESPACE
               value: {{ .Release.Namespace }}
+      {{- with .Values.randomScheduler.nodeSelector }}
+      nodeSelector:
+      {{ toYaml . | indent 2 }}
+      {{- end }}
 {{- end }}
diff --git a/helm/templates/theodolite/theodolite-operator.yaml b/helm/templates/theodolite/theodolite-operator.yaml
index 3d1d18630..98e0688f7 100644
--- a/helm/templates/theodolite/theodolite-operator.yaml
+++ b/helm/templates/theodolite/theodolite-operator.yaml
@@ -132,4 +132,8 @@ spec:
         configMap:
           name: benchmark-resources-custom
           optional: true
+      {{- with .Values.operator.nodeSelector }}
+      nodeSelector:
+      {{ toYaml . | indent 2 }}
+      {{- end }}
 {{- end }}
diff --git a/helm/values.yaml b/helm/values.yaml
index 6c20f4bab..b4a0a01d8 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -253,6 +253,8 @@ operator:
   imageTag: latest
   imagePullPolicy: Always
 
+  nodeSelector: {}
+
   sloChecker:
     lagTrend:
       enabled: true
@@ -295,3 +297,4 @@ randomScheduler:
     create: true
   serviceAccount:
     create: true
+  nodeSelector: {}
-- 
GitLab