fix namespace range with additional check for either single namespace being false, or append to the workflow namespaces: the first non-null (coalesce) from the workflow namespace or the namespace Argo is being deployed to.
Signed-off-by: reinvantveer <reinvantveer@gmail.com>
This commit is contained in:
parent
ff83f5e3f4
commit
797fe0a369
3 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.rbac.create -}}
|
||||
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
|
||||
{{- range $namespace := or .Values.singeNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.rbac.create -}}
|
||||
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
|
||||
{{- range $namespace := or .Values.singeNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.workflow.serviceAccount.create -}}
|
||||
{{- range $namespace := .Values.singeNamespace | ternary (list "") (append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq) }}
|
||||
{{- range $namespace := or .Values.singeNamespace false | ternary (list "") (append .Values.controller.workflowNamespaces (coalesce .Values.workflow.namespace .Release.Namespace) | uniq) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
|
|
Loading…
Reference in a new issue