From edc78bfd9c3bff6b2381e0a0fc1cebcd84924b90 Mon Sep 17 00:00:00 2001 From: Zadkiel AHARONIAN Date: Wed, 13 Nov 2024 18:31:52 +0100 Subject: [PATCH] fix: allow disabling custom service accounts --- application/templates/cronjob.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/templates/cronjob.yaml b/application/templates/cronjob.yaml index 3db0c94c..17553067 100644 --- a/application/templates/cronjob.yaml +++ b/application/templates/cronjob.yaml @@ -55,12 +55,14 @@ spec: {{- end }} spec: {{- if $.Values.rbac.enabled }} + {{- if $.Values.rbac.serviceAccount.enabled }} {{- if $.Values.rbac.serviceAccount.name }} serviceAccountName: {{ $.Values.rbac.serviceAccount.name }} - {{- else }} + {{- else }} serviceAccountName: {{ template "application.name" $ }} {{- end }} {{- end }} + {{- end }} containers: - name: {{ $name }} {{- $image := required (print "Undefined image repo for container '" $name "'") $job.image.repository }}