diff --git a/charts/argo-workflows/templates/controller/workflow-rb.yaml b/charts/argo-workflows/templates/controller/workflow-rb.yaml index f23675ed..4c72d27c 100644 --- a/charts/argo-workflows/templates/controller/workflow-rb.yaml +++ b/charts/argo-workflows/templates/controller/workflow-rb.yaml @@ -1,5 +1,5 @@ {{- if .Values.workflow.rbac.create -}} - {{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }} + {{- range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/charts/argo-workflows/templates/controller/workflow-role.yaml b/charts/argo-workflows/templates/controller/workflow-role.yaml index af1b4cf5..bfe63af1 100644 --- a/charts/argo-workflows/templates/controller/workflow-role.yaml +++ b/charts/argo-workflows/templates/controller/workflow-role.yaml @@ -1,6 +1,5 @@ {{- if .Values.workflow.rbac.create -}} - - {{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }} + {{- range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/charts/argo-workflows/templates/controller/workflow-sa.yaml b/charts/argo-workflows/templates/controller/workflow-sa.yaml index f88d01dd..d910ec16 100644 --- a/charts/argo-workflows/templates/controller/workflow-sa.yaml +++ b/charts/argo-workflows/templates/controller/workflow-sa.yaml @@ -1,5 +1,5 @@ {{- if .Values.workflow.serviceAccount.create -}} - {{ range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }} + {{ range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }} --- apiVersion: v1 kind: ServiceAccount