Skip to content

Add nodeSelector, tolerations and affinity configuration on the component level #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion zammad/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: zammad
version: 14.1.3
version: 14.2.0
appVersion: 6.5.0-75
description: Zammad is a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails.
home: https://zammad.org
Expand Down
12 changes: 12 additions & 0 deletions zammad/templates/deployment-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ spec:
{{- end }}
spec:
{{- include "zammad.podSpec.deployment" . | nindent 6 }}
{{- with .Values.zammadConfig.nginx.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.nginx.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.nginx.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with .Values.zammadConfig.nginx.sidecars }}
{{- toYaml . | nindent 8}}
Expand Down
12 changes: 12 additions & 0 deletions zammad/templates/deployment-railsserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ spec:
{{- end }}
spec:
{{- include "zammad.podSpec.deployment" . | nindent 6 }}
{{- with .Values.zammadConfig.railsserver.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.railsserver.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.railsserver.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with .Values.zammadConfig.railsserver.sidecars }}
{{- toYaml . | nindent 8}}
Expand Down
12 changes: 12 additions & 0 deletions zammad/templates/deployment-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ spec:
{{- end }}
spec:
{{- include "zammad.podSpec.deployment" . | nindent 6 }}
{{- with .Values.zammadConfig.scheduler.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.scheduler.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.scheduler.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with .Values.zammadConfig.scheduler.sidecars }}
{{- toYaml . | nindent 8}}
Expand Down
12 changes: 12 additions & 0 deletions zammad/templates/job-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ spec:
{{- with .Values.zammadConfig.initJob.podSpec }}
{{- toYaml . | nindent 6}}
{{- end }}
{{- with .Values.zammadConfig.initJob.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.initJob.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.zammadConfig.initJob.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: OnFailure
initContainers:
{{- with .Values.initContainers }}
Expand Down
130 changes: 124 additions & 6 deletions zammad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,30 @@ zammadConfig:
# my-label: "value"
podAnnotations: {}
# my-annotation: "value"
nodeSelector: {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you're on it, can you please sort the YAML keys alphabetically?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the ones I added? I reused the same order as it was for common ones.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice for all of them :)

# node-label: "value"
tolerations: []
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# topologyKey: kubernetes.io/hostname # For host anti-affinity
# labelSelector:
# matchLabels:
# app.kubernetes.io/component: zammad-nginx

postgresql:
# enable/disable postgresql chart dependency
Expand Down Expand Up @@ -195,6 +219,30 @@ zammadConfig:
# my-label: "value"
podAnnotations: {}
# my-annotation: "value"
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# topologyKey: kubernetes.io/hostname # For host anti-affinity
# labelSelector:
# matchLabels:
# app.kubernetes.io/component: zammad-railsserver
nodeSelector: {}
# node-label: "value"
tolerations: []
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"

redis:
# enable/disable redis chart dependency
Expand Down Expand Up @@ -225,6 +273,22 @@ zammadConfig:
# my-label: "value"
podAnnotations: {}
# my-annotation: "value"
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"
nodeSelector: {}
# node-label: "value"
tolerations: []
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"

storageVolume:
# Enable this for 'File' based storage in Zammad. You must provide an externally managed 'extistingClaim'
Expand Down Expand Up @@ -292,6 +356,22 @@ zammadConfig:
# my-label: "value"
podAnnotations: {}
# my-annotation: "value"
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"
nodeSelector: {}
# node-label: "value"
tolerations: []
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"

initContainers:
elasticsearch:
Expand Down Expand Up @@ -381,6 +461,23 @@ zammadConfig:
# my-annotation: "value"
podSpec: {}
# my-podspec: "value"
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"
nodeSelector: {}
# node-label: "value"
tolerations: []
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"


cronJob:
reindex:
Expand Down Expand Up @@ -441,18 +538,39 @@ autoWizard:
# ]
# }

commonLabels: {}
# my-label: "value"
# Common pod affinity for all Zammad components. Values in .Zammad.*.affinity will override this.
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-label"
# operator: In
# values:
# - "value"

commonAnnotations: {}
# my-annotation: "value"
podLabels: {}
# my-label: "value"

commonLabels: {}
# my-label: "value"

# Common pod nodeSelector for all Zammad components. Values in .Zammad.*.nodeSelector will override this.
nodeSelector: {}
# node-label: "value"

podAnnotations: {}
# my-annotation: "value"

nodeSelector: {}
podLabels: {}
# my-label: "value"

# Common pod tolerations for all Zammad components. Values in .Zammad.*.tolerations will override this.
tolerations: []
affinity: {}
# - key: "key"
# operator: "Equal"
# value: "value"
# effect: "NoSchedule"

# service account configurations
serviceAccount:
Expand Down