Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions charts/mageai/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range $constraint := . }}
- {{ toYaml $constraint | nindent 10 | trim }}
{{- if not $constraint.labelSelector }}
labelSelector:
matchLabels:
{{- include "mageai.selectorLabels" $ | nindent 14 }}
{{- end }}
{{- end }}
{{- end }}
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
Expand Down
11 changes: 11 additions & 0 deletions charts/mageai/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.scheduler.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range $constraint := . }}
- {{ toYaml $constraint | nindent 10 | trim }}
{{- if not $constraint.labelSelector }}
labelSelector:
matchLabels:
{{- include "mageai.schedulerSelectorLabels" $ | nindent 14 }}
{{- end }}
{{- end }}
{{- end }}
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
Expand Down
11 changes: 11 additions & 0 deletions charts/mageai/templates/webservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webServer.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range $constraint := . }}
- {{ toYaml $constraint | nindent 10 | trim }}
{{- if not $constraint.labelSelector }}
labelSelector:
matchLabels:
{{- include "mageai.selectorLabels" $ | nindent 14 }}
{{- end }}
{{- end }}
{{- end }}
volumes:
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
Expand Down
35 changes: 35 additions & 0 deletions charts/mageai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ scheduler:
# maxReplicas: 10
# targetCPUUtilizationPercentage: 50

topologySpreadConstraints: []
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway
# matchLabelKeys:
# - pod-template-hash
# - maxSkew: 1
# topologyKey: kubernetes.io/hostname
# whenUnsatisfiable: DoNotSchedule
# matchLabelKeys:
# - pod-template-hash

# Effective if standaloneScheduler is true
webServer:
replicaCount: 1
Expand All @@ -44,6 +56,17 @@ webServer:
# minReplicas: 1
# maxReplicas: 10
# targetCPUUtilizationPercentage: 50
topologySpreadConstraints: []
# - maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway
# matchLabelKeys:
# - pod-template-hash
# - maxSkew: 1
# topologyKey: kubernetes.io/hostname
# whenUnsatisfiable: DoNotSchedule
# matchLabelKeys:
# - pod-template-hash

# Enable Postgres as the DB
postgresql:
Expand Down Expand Up @@ -174,6 +197,18 @@ nodeSelector: {}

tolerations: []

topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
matchLabelKeys:
- pod-template-hash
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
matchLabelKeys:
- pod-template-hash

affinity: {}

extraVolumeMounts:
Expand Down