From 9cde342c66a90ad12fb66e9035173be6f80f4737 Mon Sep 17 00:00:00 2001 From: Vlad Losev Date: Fri, 15 May 2020 11:06:44 -0700 Subject: [PATCH] Specifies namespace only for cluster role bindings. --- charts/argo/templates/server-crb.yaml | 2 ++ charts/argo/templates/workflow-controller-crb.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/argo/templates/server-crb.yaml b/charts/argo/templates/server-crb.yaml index bab4fa4c..1cff9189 100644 --- a/charts/argo/templates/server-crb.yaml +++ b/charts/argo/templates/server-crb.yaml @@ -16,5 +16,7 @@ roleRef: subjects: - kind: ServiceAccount name: {{ .Values.server.serviceAccount }} + {{- if not .Values.singleNamespace }} namespace: {{ .Release.Namespace }} + {{- else }} {{- end -}} diff --git a/charts/argo/templates/workflow-controller-crb.yaml b/charts/argo/templates/workflow-controller-crb.yaml index fb9ab10d..93983812 100644 --- a/charts/argo/templates/workflow-controller-crb.yaml +++ b/charts/argo/templates/workflow-controller-crb.yaml @@ -13,7 +13,9 @@ roleRef: subjects: - kind: ServiceAccount name: {{ .Values.controller.serviceAccount }} + {{- if not .Values.singleNamespace }} namespace: {{ .Release.Namespace }} + {{- end }} {{- if .Values.controller.workflowNamespaces }} {{- $uiServiceAccount := .Values.controller.serviceAccount }} {{- $namespace := .Release.Namespace }}