compress namespaces from controller.workflowNamespaces and workflow.namespace into single loop iteration
Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This commit is contained in:
parent
e07ca6dee7
commit
1a2c4b6388
1 changed files with 3 additions and 14 deletions
|
@ -28,8 +28,7 @@ rules:
|
||||||
|
|
||||||
{{- if .Values.workflow.rbac.create -}}
|
{{- if .Values.workflow.rbac.create -}}
|
||||||
|
|
||||||
{{- if .Values.controller.workflowNamespaces }}
|
{{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }}
|
||||||
{{- range .Values.controller.workflowNamespaces}}
|
|
||||||
{{ $namespace := . }}
|
{{ $namespace := . }}
|
||||||
{{- include "workflow-role-base" . }}
|
{{- include "workflow-role-base" . }}
|
||||||
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
||||||
|
@ -37,14 +36,4 @@ rules:
|
||||||
{{- include "workflow-role-rules" . }}
|
{{- include "workflow-role-rules" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- else }}
|
|
||||||
|
|
||||||
{{- include "workflow-role-base" . }}
|
|
||||||
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
|
||||||
{{- if .Values.workflow.namespace }}
|
|
||||||
namespace: {{ .Values.workflow.namespace }}
|
|
||||||
{{- end }}
|
|
||||||
{{- include "workflow-role-rules" . }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue