fix append vs. concat bug: append workflowNamespace to (possibly 0-lenght) list of controller.workflowNamespaces

Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This commit is contained in:
reinvantveer 2021-07-15 09:47:12 +02:00
parent 2bfcf1bc0e
commit ff83f5e3f4
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{{- if .Values.workflow.rbac.create -}}
{{- range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }}
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding

View file

@ -1,5 +1,5 @@
{{- if .Values.workflow.rbac.create -}}
{{- range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }}
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role

View file

@ -1,5 +1,5 @@
{{- if .Values.workflow.serviceAccount.create -}}
{{ range $namespace := .Values.singeNamespace | ternary (list "") (concat .Values.workflow.namespace .Values.controller.workflowNamespaces | compact | uniq) }}
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
---
apiVersion: v1
kind: ServiceAccount