Skip to content

Commit d20d076

Browse files
committed
added affinity and tolerations to cronjobs
1 parent 362e5cd commit d20d076

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

helm/blueapi/templates/cronjob.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ spec:
7575
image: bitnami/kubectl:latest
7676
imagePullPolicy: IfNotPresent
7777
command: ["/scripts/time-stamper.sh"]
78+
{{- with .Values.nodeSelector }}
79+
nodeSelector:
80+
{{- toYaml . | nindent 8 }}
81+
{{- end }}
82+
{{- with .Values.affinity }}
83+
affinity:
84+
{{- toYaml . | nindent 8 }}
85+
{{- end }}
86+
{{- with .Values.tolerations }}
87+
tolerations:
88+
{{- toYaml . | nindent 8 }}
89+
{{- end }}
7890
restartPolicy: OnFailure
7991
{{- end }}
8092
{{- if .Values.pvcAutoDeletion.enabled }}
@@ -155,5 +167,18 @@ spec:
155167
image: bitnami/kubectl:latest
156168
imagePullPolicy: IfNotPresent
157169
command: ["/scripts/pvc-deletion.sh"]
170+
{{- with .Values.nodeSelector }}
171+
nodeSelector:
172+
{{- toYaml . | nindent 8 }}
173+
{{- end }}
174+
{{- with .Values.affinity }}
175+
affinity:
176+
{{- toYaml . | nindent 8 }}
177+
{{- end }}
178+
{{- with .Values.tolerations }}
179+
tolerations:
180+
{{- toYaml . | nindent 8 }}
181+
{{- end }}
158182
restartPolicy: OnFailure
183+
159184
{{- end }}

0 commit comments

Comments
 (0)