File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11apiVersion : v1
22name : pgdog
3- version : v0.74
4- appVersion : " 0 .1.52"
3+ version : v0.75
4+ appVersion : " v0 .1.52"
Original file line number Diff line number Diff line change @@ -160,6 +160,20 @@ podAntiAffinity:
160160 type: soft # "soft" (preferred) or "hard" (required)
161161` ` `
162162
163+ # ### Multi-AZ
164+
165+ Spread replicas evenly across availability zones with a maximum skew of one :
166+
167+ ` ` ` yaml
168+ multiAz:
169+ enabled: true
170+ whenUnsatisfiable: ScheduleAnyway
171+ ` ` `
172+
173+ This uses the `topology.kubernetes.io/zone` node label. Set
174+ ` whenUnsatisfiable` to `DoNotSchedule` to make the constraint strict. Additional
175+ constraints can be set with `topologySpreadConstraints`.
176+
163177# ## Config Change Restarts
164178
165179By default, ConfigMap changes are not automatically picked up by
Original file line number Diff line number Diff line change @@ -462,6 +462,12 @@ topologySpreadConstraints:
462462 description : Topology spread constraints
463463 items :
464464 type : object
465+ multiAz.enabled :
466+ type : boolean
467+ description : Enable spreading pods evenly across availability zones
468+ multiAz.whenUnsatisfiable :
469+ enum : ["DoNotSchedule", "ScheduleAnyway"]
470+ description : Action to take when the zone spread constraint cannot be satisfied
465471
466472# --- Pod anti-affinity ---
467473podAntiAffinity.enabled :
Original file line number Diff line number Diff line change @@ -279,9 +279,19 @@ spec:
279279 {{- end }}
280280 {{- end }}
281281 {{- end }}
282- {{- with .Values.topologySpreadConstraints }}
282+ {{- if or .Values.multiAz.enabled .Values.topologySpreadConstraints }}
283283 topologySpreadConstraints :
284+ {{- if .Values.multiAz.enabled }}
285+ - maxSkew : 1
286+ topologyKey : topology.kubernetes.io/zone
287+ whenUnsatisfiable : {{ .Values.multiAz.whenUnsatisfiable }}
288+ labelSelector :
289+ matchLabels :
290+ {{- include "pgdog.selectorLabels" . | nindent 14 }}
291+ {{- end }}
292+ {{- with .Values.topologySpreadConstraints }}
284293 {{- toYaml . | nindent 8 }}
294+ {{- end }}
285295 {{- end }}
286296 {{- if and .Values.statefulSet.enabled .Values.statefulSet.walPvc.enabled }}
287297 volumeClaimTemplates :
Original file line number Diff line number Diff line change 1+ # Test multi-AZ topology spread rendering
2+ multiAz :
3+ enabled : true
4+ whenUnsatisfiable : DoNotSchedule
Original file line number Diff line number Diff line change @@ -397,6 +397,12 @@ topologySpreadConstraints: []
397397 # matchLabels:
398398 # app: pgdog
399399
400+ # multiAz spreads pods evenly across availability zones with a maximum skew of 1.
401+ multiAz :
402+ enabled : true
403+ # Valid values: DoNotSchedule, ScheduleAnyway
404+ whenUnsatisfiable : ScheduleAnyway
405+
400406# podAntiAffinity enables default anti-affinity rules to spread pods
401407# across nodes
402408# Set to true for automatic pod anti-affinity configuration
You can’t perform that action at this time.
0 commit comments