simplify setting service account, fix syntactical error in defaulting to "argo" namespace

Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This commit is contained in:
reinvantveer 2021-07-07 10:02:33 +02:00
parent e2ef04ff68
commit e48a03a441

View file

@ -41,15 +41,11 @@ metadata:
{{- /*
The namespace will default to "argo" if neither "namespaces" nor "namespace" is set
*/}}
{{- $namespaces := tuple ( .Values | get "workflow.namespace" "argo") }}
{{- range $namespaces }}
{{- $namespace := . }}
{{ include "sa-base" . }}
{{ include "sa-base" . }}
name: {{ $.Values.workflow.serviceAccount.name }}
namespace: {{ $namespace }}
namespace: {{ .Values.workflow.namespace | default "argo" }}
annotations:
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}