re-use controller.workflowNamespaces instead of introducing workflow.namespaces
Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This commit is contained in:
parent
41c6be74c4
commit
1a60f03610
1 changed files with 6 additions and 6 deletions
|
@ -12,21 +12,21 @@ metadata:
|
|||
This type check is done only once, here. It would be overkill to perform it for other RBAC resources as well.
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.workflow.namespaces .Values.workflow.namespace }}
|
||||
{{- fail "Please set either workflow.namespaces or workflow.namespace for the service account, not both" }}
|
||||
{{- if and .Values.controller.workflowNamespaces .Values.workflow.namespace }}
|
||||
{{- fail "Please set either controller.workflowNamespaces or workflow.namespace for the service account, not both" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.workflow.namespaces }}
|
||||
{{- if .Values.controller.workflowNamespaces }}
|
||||
|
||||
{{- /*
|
||||
Type-check the namespaces variable for being a list ("slice")
|
||||
This type check is done only once, here. It would be overkill to perform it for other RBAC resources as well.
|
||||
*/}}
|
||||
{{- if not ( kindIs "slice" .Values.workflow.namespaces ) }}
|
||||
{{- fail ( printf "workflow.namespaces is a slice, got %s %s" ( kindOf .Values.workflow.namespaces ) .Values.workflow.namespaces ) }}
|
||||
{{- if not ( kindIs "slice" .Values.controller.workflowNamespaces ) }}
|
||||
{{- fail ( printf "workflow.namespaces is a slice, got %s %s" ( kindOf .Values.controller.workflowNamespaces ) .Values.controller.workflowNamespaces ) }}
|
||||
{{- end }}
|
||||
|
||||
{{ $namespaces := .Values.workflow.namespaces }}
|
||||
{{ $namespaces := .Values.controller.workflowNamespaces }}
|
||||
{{- range $namespaces }}
|
||||
{{ $namespace := . }}
|
||||
{{ include "sa-base" . }}
|
||||
|
|
Loading…
Reference in a new issue