aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/strimzi/templates/strimzi-kafka.yaml24
-rw-r--r--kubernetes/strimzi/values.yaml3
2 files changed, 27 insertions, 0 deletions
diff --git a/kubernetes/strimzi/templates/strimzi-kafka.yaml b/kubernetes/strimzi/templates/strimzi-kafka.yaml
index 4071aa03a6..a808b84441 100644
--- a/kubernetes/strimzi/templates/strimzi-kafka.yaml
+++ b/kubernetes/strimzi/templates/strimzi-kafka.yaml
@@ -72,6 +72,18 @@ spec:
securityContext:
runAsUser: 0
fsGroup: 0
+ {{- if .Values.affinity.podAntiAffinity.enabled }}
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: strimzi.io/name
+ operator: In
+ values:
+ - {{ include "common.fullname" . }}-kafka
+ topologyKey: "kubernetes.io/hostname"
+ {{- end }}
config:
default.replication.factor: {{ .Values.replicaCount }}
min.insync.replicas: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
@@ -104,6 +116,18 @@ spec:
securityContext:
runAsUser: 0
fsGroup: 0
+ {{- if .Values.affinity.podAntiAffinity.enabled }}
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - labelSelector:
+ matchExpressions:
+ - key: strimzi.io/name
+ operator: In
+ values:
+ - {{ include "common.fullname" . }}-zookeeper
+ topologyKey: "kubernetes.io/hostname"
+ {{- end }}
replicas: {{ .Values.replicaCount }}
config:
ssl.hostnameVerification: false
diff --git a/kubernetes/strimzi/values.yaml b/kubernetes/strimzi/values.yaml
index bb22de7ebd..a9eed5d8b9 100644
--- a/kubernetes/strimzi/values.yaml
+++ b/kubernetes/strimzi/values.yaml
@@ -29,6 +29,9 @@ global:
# Application configuration defaults.
#################################################################
replicaCount: 3
+affinity:
+ podAntiAffinity:
+ enabled: true
config:
kafkaVersion: 3.4.0
authType: simple