Skip to content

Commit

Permalink
Improving Affinity Config for Jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbpolito committed Feb 7, 2022
1 parent 7521b0e commit 09c0d3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions charts/generic/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with $.Values.nodeSelector }}
{{- with $cronjob.nodeSelector | default $.Values.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.affinity }}
{{- with $cronjob.affinity | default $.Values.affinity }}
affinity: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.tolerations }}
{{- with $cronjob.tolerations | default $.Values.tolerations }}
tolerations: {{ toYaml . | nindent 12 }}
{{- end }}
---
Expand Down
12 changes: 6 additions & 6 deletions charts/generic/templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with $.Values.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- with $job.nodeSelector | default $.Values.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- with $job.affinity | default $.Values.affinity }}
affinity: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- with $job.tolerations | default $.Values.tolerations }}
tolerations: {{ toYaml . | nindent 12 }}
{{- end }}
---
{{- end }}
Expand Down

0 comments on commit 09c0d3a

Please sign in to comment.