From e48a03a441c48428572f6b0b001e2fc9f880dc5c Mon Sep 17 00:00:00 2001 From: reinvantveer Date: Wed, 7 Jul 2021 10:02:33 +0200 Subject: [PATCH] simplify setting service account, fix syntactical error in defaulting to "argo" namespace Signed-off-by: reinvantveer --- .../templates/controller/workflow-sa.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/charts/argo-workflows/templates/controller/workflow-sa.yaml b/charts/argo-workflows/templates/controller/workflow-sa.yaml index ea4322c8..12c6ae3e 100644 --- a/charts/argo-workflows/templates/controller/workflow-sa.yaml +++ b/charts/argo-workflows/templates/controller/workflow-sa.yaml @@ -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 }}