Skip to content
Snippets Groups Projects
Commit f0b7fd7b authored by Lorenz Boguhn's avatar Lorenz Boguhn
Browse files

Add topologySpreadConstraints to helm strimzi template to kafka and zookeeper

parent 242b70a6
No related branches found
No related tags found
1 merge request!298Introduces Kubernetes Topology Spread Constraints
Pipeline #9262 failed
......@@ -5,6 +5,9 @@ metadata:
name: {{ template "theodolite.fullname" . }}-kafka
spec:
kafka:
resources:
requests:
cpu: "2000m"
jmxOptions: {}
{{- with .Values.strimzi.kafka.listeners }}
listeners:
......@@ -30,9 +33,21 @@ spec:
configMapKeyRef:
name: {{ template "theodolite.fullname" . }}-kafka-metrics
key: kafka-metrics-config.yml
{{- with .Values.strimzi.kafka.template}}
template:
{{- toYaml . | nindent 6 }}
pod:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
strimzi.io/name: theodolite-kafka-kafka
{{- with .Values.strimzi.kafka.nodeSelectorTerms}}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
{{- toYaml . | nindent 16 }}
{{- end}}
{{- with .Values.strimzi.kafka.resources}}
resources:
......@@ -47,9 +62,14 @@ spec:
{{- end }}
storage:
type: ephemeral
{{- with .Values.strimzi.kafka.template}}
{{- with .Values.strimzi.zookeeper.nodeSelectorTerms}}
template:
{{- toYaml . | nindent 6 }}
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
{{- toYaml . | nindent 16 }}
{{- end}}
kafkaExporter: {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment