File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 {{- include "sim.nodeSelector" .Values.app | nindent 6 }}
4141 {{- include "sim.tolerations" .Values | nindent 6 }}
4242 {{- include "sim.affinity" .Values | nindent 6 }}
43- {{- include "sim.topologySpreadConstraints" .Values | nindent 6 }}
43+ {{- include "sim.topologySpreadConstraints" .Values.app | nindent 6 }}
4444 {{- if .Values.migrations.enabled }}
4545 initContainers :
4646 - name : migrations
Original file line number Diff line number Diff line change 3737 {{- include "sim.nodeSelector" .Values.realtime | nindent 6 }}
3838 {{- include "sim.tolerations" .Values | nindent 6 }}
3939 {{- include "sim.affinity" .Values | nindent 6 }}
40- {{- include "sim.topologySpreadConstraints" .Values | nindent 6 }}
40+ {{- include "sim.topologySpreadConstraints" .Values.realtime | nindent 6 }}
4141 containers :
4242 - name : realtime
4343 image : {{ include "sim.image" (dict "imageRoot" .Values.realtime.image "global" .Values.global "chartAppVersion" .Chart.AppVersion) }}
Original file line number Diff line number Diff line change 4040 template : deployment-app.yaml
4141 set :
4242 << : *defaults
43- topologySpreadConstraints :
43+ app. topologySpreadConstraints :
4444 - maxSkew : 1
4545 topologyKey : topology.kubernetes.io/zone
4646 whenUnsatisfiable : ScheduleAnyway
5959 template : deployment-realtime.yaml
6060 set :
6161 << : *defaults
62- topologySpreadConstraints :
62+ realtime. topologySpreadConstraints :
6363 - maxSkew : 1
6464 topologyKey : topology.kubernetes.io/zone
6565 whenUnsatisfiable : ScheduleAnyway
@@ -70,3 +70,18 @@ tests:
7070 - equal :
7171 path : spec.template.spec.topologySpreadConstraints[0].topologyKey
7272 value : topology.kubernetes.io/zone
73+
74+ - it : app topologySpreadConstraints do not leak onto realtime pod
75+ template : deployment-realtime.yaml
76+ set :
77+ << : *defaults
78+ app.topologySpreadConstraints :
79+ - maxSkew : 1
80+ topologyKey : topology.kubernetes.io/zone
81+ whenUnsatisfiable : ScheduleAnyway
82+ labelSelector :
83+ matchLabels :
84+ app.kubernetes.io/name : sim
85+ asserts :
86+ - isNull :
87+ path : spec.template.spec.topologySpreadConstraints
Original file line number Diff line number Diff line change 4141 # Node selector for pod scheduling (leave empty to allow scheduling on any node)
4242 nodeSelector : {}
4343
44+ # Topology spread constraints for app pods (HA across zones / nodes).
45+ # Each entry must include its own labelSelector.
46+ topologySpreadConstraints : []
47+
4448 # Pod security context
4549 podSecurityContext :
4650 fsGroup : 1001
@@ -409,11 +413,15 @@ realtime:
409413
410414 # Node selector for pod scheduling (leave empty to allow scheduling on any node)
411415 nodeSelector : {}
412-
416+
417+ # Topology spread constraints for realtime pods (HA across zones / nodes).
418+ # Each entry must include its own labelSelector.
419+ topologySpreadConstraints : []
420+
413421 # Pod security context
414422 podSecurityContext :
415423 fsGroup : 1001
416-
424+
417425 # Container security context
418426 securityContext :
419427 runAsNonRoot : true
@@ -1051,19 +1059,6 @@ affinity: {}
10511059# Tolerations for scheduling on tainted nodes
10521060tolerations : []
10531061
1054- # Topology spread constraints — for HA across zones / nodes.
1055- # Each entry must include its own labelSelector. Common pattern:
1056- #
1057- # topologySpreadConstraints:
1058- # - maxSkew: 1
1059- # topologyKey: topology.kubernetes.io/zone
1060- # whenUnsatisfiable: ScheduleAnyway
1061- # labelSelector:
1062- # matchLabels:
1063- # app.kubernetes.io/name: sim
1064- # app.kubernetes.io/instance: my-release
1065- topologySpreadConstraints : []
1066-
10671062# CronJob configuration for scheduled tasks
10681063cronjobs :
10691064 # Enable/disable all cron jobs
You can’t perform that action at this time.
0 commit comments