From e2ef04ff68adce6141f4a5ec4ede1d9c8dc84386 Mon Sep 17 00:00:00 2001 From: reinvantveer Date: Tue, 6 Jul 2021 12:18:10 +0200 Subject: [PATCH] default to "argo" namespace for workflow service account Signed-off-by: reinvantveer --- .../argo-workflows/templates/controller/workflow-sa.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/charts/argo-workflows/templates/controller/workflow-sa.yaml b/charts/argo-workflows/templates/controller/workflow-sa.yaml index 78f9d1a4..ea4322c8 100644 --- a/charts/argo-workflows/templates/controller/workflow-sa.yaml +++ b/charts/argo-workflows/templates/controller/workflow-sa.yaml @@ -16,10 +16,6 @@ metadata: {{- fail "Please set either workflow.namespaces or workflow.namespace for the service account, not both" }} {{- end }} - {{- if and ( not .Values.workflow.namespace ) ( not .Values.workflow.namespaces ) }} - {{- fail "Please set either workflow.namespaces or workflow.namespace" }} - {{- end }} - {{- if .Values.workflow.namespaces }} {{- /* @@ -42,7 +38,10 @@ metadata: {{- else }} - {{- $namespaces := tuple .Values.workflow.namespace }} + {{- /* + 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" . }}