From 4543bbaaab0df70ee95a3f64d20f1064b44931fa Mon Sep 17 00:00:00 2001 From: Simon Ehrenstein <simon.ehrenstein@gmail.com> Date: Wed, 23 Mar 2022 11:22:00 +0100 Subject: [PATCH] Closes #372 --- helm/templates/kafka/kafka-cluster.yaml | 20 +++++++++++++++++++- helm/values.yaml | 13 +++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/helm/templates/kafka/kafka-cluster.yaml b/helm/templates/kafka/kafka-cluster.yaml index 29cf038f1..1ff893965 100644 --- a/helm/templates/kafka/kafka-cluster.yaml +++ b/helm/templates/kafka/kafka-cluster.yaml @@ -30,6 +30,15 @@ spec: configMapKeyRef: name: {{ template "theodolite.fullname" . }}-kafka-metrics key: kafka-metrics-config.yml + {{- with .Values.strimzi.kafka.nodeSelectorTerms}} + template: + pod: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + {{- toYaml . | nindent 16 }} + {{- end}} zookeeper: {{- with .Values.strimzi.zookeeper.replicas }} @@ -37,7 +46,16 @@ spec: {{- toYaml . | nindent 6 }} {{- end }} storage: - type: ephemeral + type: ephemeral + {{- with .Values.strimzi.zookeeper.nodeSelectorTerms}} + template: + pod: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + {{- toYaml . | nindent 16 }} + {{- end}} kafkaExporter: {} diff --git a/helm/values.yaml b/helm/values.yaml index 007e069e0..fa97880d3 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -173,6 +173,12 @@ strimzi: jvmOptions: "-Xmx": "512M" "-Xms": "512M" + nodeSelectorTerms: + - matchExpressions: + - key: env + operator: In + values: + - prod zookeeper: replicas: 3 zooEntrance: @@ -180,6 +186,13 @@ strimzi: zookeeperClient: enabled: true nodeSelector: {} + nodeSelectorTerms: + - matchExpressions: + - key: env + operator: In + values: + - prod + topicOperator: enabled: true -- GitLab