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 }}