include case for single namespaces with default ("") namespace, otherwise (ternary) combine the workflow namespace and workflowNamespaces from the controller settings into a list to iterate over
Signed-off-by: reinvantveer <reinvantveer@gmail.com>
This commit is contained in:
parent
bfd9eaa013
commit
094cd02860
3 changed files with 3 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.workflow.rbac.create -}}
|
{{- 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
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{{- if .Values.workflow.rbac.create -}}
|
{{- if .Values.workflow.rbac.create -}}
|
||||||
|
{{- range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }}
|
||||||
{{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }}
|
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{- if .Values.workflow.serviceAccount.create -}}
|
{{- 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
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
|
|
Loading…
Reference in a new issue