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
a7ac6f6a12
commit
dd1bc1b272
1 changed files with 1 additions and 21 deletions
|
@ -17,11 +17,8 @@ subjects:
|
|||
{{- end }}
|
||||
|
||||
{{- if .Values.workflow.rbac.create -}}
|
||||
|
||||
{{- if .Values.controller.workflowNamespaces }}
|
||||
|
||||
{{- range .Values.controller.workflowNamespaces }}
|
||||
{{ $namespace := . }}
|
||||
{{- range $namespace := append .Values.controller.workflowNamespaces .Values.workflow.namespace | compact | uniq }}
|
||||
|
||||
{{ include "workflow-rb-base" . }}
|
||||
name: {{ $.Release.Name }}-workflow
|
||||
|
@ -35,22 +32,5 @@ subjects:
|
|||
namespace: {{ $namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- else }}
|
||||
|
||||
{{ include "workflow-rb-base" . }}
|
||||
name: {{ $.Release.Name }}-workflow
|
||||
{{- if $.Values.workflow.namespace }}
|
||||
namespace: {{ $.Values.workflow.namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- include "workflow-rb-roleref" . }}
|
||||
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
||||
|
||||
{{- include "workflow-rb-subjects" . }}
|
||||
name: {{ $.Values.workflow.serviceAccount.name }}
|
||||
{{- if $.Values.workflow.namespace }}
|
||||
namespace: {{ $.Values.workflow.namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue