Skip to content

Commit

Permalink
Merge pull request #41 from stakater-charts/add-affinity
Browse files Browse the repository at this point in the history
Add support to specify affinity
  • Loading branch information
ahmedwaleedmalik authored Jun 24, 2020
2 parents 438b8a8 + 215ce8e commit 945e5b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ To uninstall the chart:
| deployment.volumes | Volumes to be added to the pod | `[]` |
| deployment.volumeMounts | Mount path for Volumes | `[]` |
| deployment.tolerations | Taint tolerations for nodes | `[]` |
| deployment.affinity | Affinity for pod/node | `[]` |
| deployment.image.repository | Image repository for the application | `repository/image-name` |
| deployment.image.tag | Tag of the application Image | `v1.0.0` |
| deployment.image.pullPolicy | Pull policy for the application image | `IfNotPresent` |
Expand Down
4 changes: 4 additions & 0 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ spec:
{{- if .Values.deployment.tolerations }}
tolerations:
{{ toYaml .Values.deployment.tolerations | indent 8 -}}
{{- end }}
{{- if .Values.deployment.affinity }}
affinity:
{{ toYaml .Values.deployment.affinity | indent 8 -}}
{{- end }}
{{- if .Values.deployment.imagePullSecrets }}
imagePullSecrets:
Expand Down
13 changes: 12 additions & 1 deletion application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,18 @@ deployment:
# - key: "dedicated"
# operator: "Equal"
# value: "app"
# effect: "NoSchedule"
# effect: "NoSchedule"

# Pod affinity and pod anti-affinity allow you to specify rules about how pods should be placed relative to other pods.
affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: disktype
# operator: In
# values:
# - ssd

# Image of the app container
image:
Expand Down

0 comments on commit 945e5b3

Please sign in to comment.