diff --git a/charts/argo-workflows/templates/controller/workflow-rb.yaml b/charts/argo-workflows/templates/controller/workflow-rb.yaml index 4e38652d..ba412ed3 100644 --- a/charts/argo-workflows/templates/controller/workflow-rb.yaml +++ b/charts/argo-workflows/templates/controller/workflow-rb.yaml @@ -17,11 +17,8 @@ subjects: {{- end }} {{- if .Values.workflow.rbac.create -}} - {{- if .Values.controller.workflowNamespaces }} - - {{- range .Values.controller.workflowNamespaces }} - {{ $namespace := . }} + {{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }} {{ include "workflow-rb-base" . }} name: {{ $.Release.Name }}-workflow @@ -35,22 +32,5 @@ subjects: namespace: {{ $namespace }} {{- end }} - {{- else }} - - {{ include "workflow-rb-base" . }} - name: {{ $.Release.Name }}-workflow - {{- if $.Values.workflow.namespace }} - namespace: {{ $.Values.workflow.namespace }} - {{- end }} - - {{- include "workflow-rb-roleref" . }} - name: {{ template "argo-workflows.fullname" $ }}-workflow - - {{- include "workflow-rb-subjects" . }} - name: {{ $.Values.workflow.serviceAccount.name }} - {{- if $.Values.workflow.namespace }} - namespace: {{ $.Values.workflow.namespace }} - {{- end }} - {{- end }} {{- end }}