Skip to content

Commit

Permalink
Add topologySpreadConstraints (#16)
Browse files Browse the repository at this point in the history
* Add topologySpreadConstraints to jitsu helm chart

* Update topologySpreadConstraints to allow templating or yaml
  • Loading branch information
mleklund authored Apr 25, 2024
1 parent 42e83db commit d2e92e7
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 1 deletion.
8 changes: 8 additions & 0 deletions templates/bulker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.bulker.topologySpreadConstraints }}
topologySpreadConstraints:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions templates/console/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.console.topologySpreadConstraints }}
topologySpreadConstraints:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions templates/ingest/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.ingest.topologySpreadConstraints }}
topologySpreadConstraints:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions templates/rotor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.rotor.topologySpreadConstraints }}
topologySpreadConstraints:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions templates/syncctl/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,11 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.syncctl.topologySpreadConstraints }}
topologySpreadConstraints:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
29 changes: 28 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ console:
# https://docs.jitsu.com/self-hosting/configuration#ingest
rotorAuthKey: ""
rotorAuthKeyFrom: ""


# Public domain where ingest service is available. Leave empty to configure automatically.
# https://docs.jitsu.com/self-hosting/configuration#ingest_host
Expand Down Expand Up @@ -262,6 +262,29 @@ console:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:
# Allows use of a string template:
#
# topologySpreadConstraints: |
# - maxSkew: 1
# topologyKey: "topology.kubernetes.io/zone"
# whenUnsatisfiable: DoNotSchedule
# labelSelector:
# matchLabels:
# {{- include "jitsu.selectorLabels" . | nindent 10 }}
# {{- include "jitsu.console.selectorLabels" . | nindent 10 }}
#
# or a yaml structure:
#
# topologySpreadConstraints:
# - maxSkew: 1
# topologyKey: "topology.kubernetes.io/zone"
# whenUnsatisfiable: DoNotSchedule
# labelSelector:
# matchLabels:
# app.kubernetes.io/name: jitsu
# app.kubernetes.io/instance: jitsu
# app.kubernetes.io/component: console

bulker:
enabled: true
Expand Down Expand Up @@ -408,6 +431,7 @@ bulker:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:

rotor:
enabled: true
Expand Down Expand Up @@ -528,6 +552,7 @@ rotor:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:

ingest:
enabled: true
Expand Down Expand Up @@ -655,6 +680,7 @@ ingest:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:

syncctl:
enabled: true
Expand Down Expand Up @@ -757,6 +783,7 @@ syncctl:
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints:

migration:
enabled: true
Expand Down

0 comments on commit d2e92e7

Please sign in to comment.