Skip to content

Commit

Permalink
feat(helm): allow setting affinity for deployment (#686)
Browse files Browse the repository at this point in the history
Support setting the Affinity for pods of the `Deployment`.
  • Loading branch information
apricote committed Jul 8, 2024
1 parent 672f8e1 commit 1a8ea95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ spec:
{{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}

{{- if gt (len .Values.affinity) 0 }}
affinity:
{{ toYaml .Values.affinity | nindent 8 }}
{{- end }}

{{- if $.Values.networking.enabled }}
hostNetwork: true
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ additionalTolerations: []
nodeSelector: {}
# node-role.kubernetes.io/control-plane: ""

# Set the affinity for pods. (Only works with kind=Deployment)
affinity: {}

robot:
# Set to true to enable support for Robot (Dedicated) servers.
enabled: false
Expand Down

0 comments on commit 1a8ea95

Please sign in to comment.