Skip to content

Commit

Permalink
update cronjob template for support custom service account name
Browse files Browse the repository at this point in the history
  • Loading branch information
andychuang committed Apr 18, 2022
1 parent f7656b0 commit 41cbb5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cronjob/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ spec:
{{ $key | quote }} : {{ $value | quote }}
{{- end }}
spec:
{{- if .Values.serviceAccount }}
{{- if .Values.serviceaccount }}
serviceAccountName: {{ .Values.serviceaccount.name | default (printf "%s-pod-service-account" .Values.name) }}
{{- else if .Values.serviceAccount }}
serviceAccountName: {{ .Values.name }}-pod-service-account
{{- end }}
restartPolicy: Never
Expand Down

0 comments on commit 41cbb5c

Please sign in to comment.