Skip to content

Commit d2e92e7

Browse files
authored
Add topologySpreadConstraints (#16)
* Add topologySpreadConstraints to jitsu helm chart * Update topologySpreadConstraints to allow templating or yaml
1 parent 42e83db commit d2e92e7

File tree

6 files changed

+68
-1
lines changed

6 files changed

+68
-1
lines changed

templates/bulker/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,11 @@ spec:
136136
tolerations:
137137
{{- toYaml . | nindent 8 }}
138138
{{- end }}
139+
{{- with .Values.bulker.topologySpreadConstraints }}
140+
topologySpreadConstraints:
141+
{{- if kindIs "string" . }}
142+
{{- tpl . $ | nindent 8 }}
143+
{{- else }}
144+
{{- toYaml . | nindent 8 }}
145+
{{- end }}
146+
{{- end }}

templates/console/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,11 @@ spec:
113113
tolerations:
114114
{{- toYaml . | nindent 8 }}
115115
{{- end }}
116+
{{- with .Values.console.topologySpreadConstraints }}
117+
topologySpreadConstraints:
118+
{{- if kindIs "string" . }}
119+
{{- tpl . $ | nindent 8 }}
120+
{{- else }}
121+
{{- toYaml . | nindent 8 }}
122+
{{- end }}
123+
{{- end }}

templates/ingest/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,11 @@ spec:
136136
tolerations:
137137
{{- toYaml . | nindent 8 }}
138138
{{- end }}
139+
{{- with .Values.ingest.topologySpreadConstraints }}
140+
topologySpreadConstraints:
141+
{{- if kindIs "string" . }}
142+
{{- tpl . $ | nindent 8 }}
143+
{{- else }}
144+
{{- toYaml . | nindent 8 }}
145+
{{- end }}
146+
{{- end }}

templates/rotor/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,11 @@ spec:
154154
tolerations:
155155
{{- toYaml . | nindent 8 }}
156156
{{- end }}
157+
{{- with .Values.rotor.topologySpreadConstraints }}
158+
topologySpreadConstraints:
159+
{{- if kindIs "string" . }}
160+
{{- tpl . $ | nindent 8 }}
161+
{{- else }}
162+
{{- toYaml . | nindent 8 }}
163+
{{- end }}
164+
{{- end }}

templates/syncctl/deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,11 @@ spec:
104104
tolerations:
105105
{{- toYaml . | nindent 8 }}
106106
{{- end }}
107+
{{- with .Values.syncctl.topologySpreadConstraints }}
108+
topologySpreadConstraints:
109+
{{- if kindIs "string" . }}
110+
{{- tpl . $ | nindent 8 }}
111+
{{- else }}
112+
{{- toYaml . | nindent 8 }}
113+
{{- end }}
114+
{{- end }}

values.yaml

+28-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ console:
174174
# https://docs.jitsu.com/self-hosting/configuration#ingest
175175
rotorAuthKey: ""
176176
rotorAuthKeyFrom: ""
177-
177+
178178

179179
# Public domain where ingest service is available. Leave empty to configure automatically.
180180
# https://docs.jitsu.com/self-hosting/configuration#ingest_host
@@ -262,6 +262,29 @@ console:
262262
nodeSelector: {}
263263
tolerations: []
264264
affinity: {}
265+
topologySpreadConstraints:
266+
# Allows use of a string template:
267+
#
268+
# topologySpreadConstraints: |
269+
# - maxSkew: 1
270+
# topologyKey: "topology.kubernetes.io/zone"
271+
# whenUnsatisfiable: DoNotSchedule
272+
# labelSelector:
273+
# matchLabels:
274+
# {{- include "jitsu.selectorLabels" . | nindent 10 }}
275+
# {{- include "jitsu.console.selectorLabels" . | nindent 10 }}
276+
#
277+
# or a yaml structure:
278+
#
279+
# topologySpreadConstraints:
280+
# - maxSkew: 1
281+
# topologyKey: "topology.kubernetes.io/zone"
282+
# whenUnsatisfiable: DoNotSchedule
283+
# labelSelector:
284+
# matchLabels:
285+
# app.kubernetes.io/name: jitsu
286+
# app.kubernetes.io/instance: jitsu
287+
# app.kubernetes.io/component: console
265288

266289
bulker:
267290
enabled: true
@@ -408,6 +431,7 @@ bulker:
408431
nodeSelector: {}
409432
tolerations: []
410433
affinity: {}
434+
topologySpreadConstraints:
411435

412436
rotor:
413437
enabled: true
@@ -528,6 +552,7 @@ rotor:
528552
nodeSelector: {}
529553
tolerations: []
530554
affinity: {}
555+
topologySpreadConstraints:
531556

532557
ingest:
533558
enabled: true
@@ -655,6 +680,7 @@ ingest:
655680
nodeSelector: {}
656681
tolerations: []
657682
affinity: {}
683+
topologySpreadConstraints:
658684

659685
syncctl:
660686
enabled: true
@@ -757,6 +783,7 @@ syncctl:
757783
nodeSelector: {}
758784
tolerations: []
759785
affinity: {}
786+
topologySpreadConstraints:
760787

761788
migration:
762789
enabled: true

0 commit comments

Comments
 (0)