Skip to content

Commit e8cef38

Browse files
authored
feat: add topology spread (#39)
1 parent 29b3e8a commit e8cef38

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,7 @@ spec:
149149
{{- end }}
150150
{{- end }}
151151
{{- end }}
152+
{{- with .Values.topologySpreadConstraints }}
153+
topologySpreadConstraints:
154+
{{- toYaml . | nindent 8 }}
155+
{{- end }}

values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,16 @@ affinity: {}
143143
# - pgdog
144144
# topologyKey: kubernetes.io/hostname
145145

146+
# topologySpreadConstraints controls how pods are spread across topology domains
147+
# https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
148+
topologySpreadConstraints: []
149+
# - maxSkew: 1
150+
# topologyKey: topology.kubernetes.io/zone
151+
# whenUnsatisfiable: DoNotSchedule
152+
# labelSelector:
153+
# matchLabels:
154+
# app: pgdog
155+
146156
# podAntiAffinity enables default anti-affinity rules to spread pods
147157
# across nodes
148158
# Set to true for automatic pod anti-affinity configuration

0 commit comments

Comments
 (0)