fix indents
Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
This commit is contained in:
parent
c7ede31b45
commit
612bbf1ab6
2 changed files with 39 additions and 38 deletions
|
@ -3,11 +3,11 @@
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: Role
|
kind: Role
|
||||||
metadata:
|
metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/* workflow-role-rules are defined separately so they can be inserted after templating the metadata */}}
|
{{/* workflow-role-rules are defined separately so they can be inserted after templating the metadata */}}
|
||||||
|
|
||||||
{{- define "workflow-role-rules" }}
|
{{- define "workflow-role-rules" }}
|
||||||
rules:
|
rules:
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
|
@ -24,26 +24,27 @@ rules:
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
- watch
|
- watch
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.workflow.rbac.create -}}
|
{{- if .Values.workflow.rbac.create -}}
|
||||||
|
|
||||||
{{- if .Values.workflow.namespaces }}
|
{{- if .Values.workflow.namespaces }}
|
||||||
{{- range .Values.workflow.namespaces}}
|
{{- range .Values.workflow.namespaces}}
|
||||||
{{ $namespace := . }}
|
{{ $namespace := . }}
|
||||||
{{- include "workflow-role-base" . }}
|
{{- include "workflow-role-base" . }}
|
||||||
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
||||||
namespace: {{ $namespace }}
|
namespace: {{ $namespace }}
|
||||||
{{- include "workflow-role-rules" . }}
|
{{- include "workflow-role-rules" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
||||||
{{- include "workflow-role-base" . }}
|
{{- include "workflow-role-base" . }}
|
||||||
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
name: {{ template "argo-workflows.fullname" $ }}-workflow
|
||||||
{{- if .Values.workflow.namespace }}
|
{{- if .Values.workflow.namespace }}
|
||||||
namespace: {{ .Values.workflow.namespace }}
|
namespace: {{ .Values.workflow.namespace }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- include "workflow-role-rules" . }}
|
{{- include "workflow-role-rules" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
|
@ -3,9 +3,9 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.workflow.serviceAccount.create -}}
|
{{- if .Values.workflow.serviceAccount.create -}}
|
||||||
|
|
||||||
{{- /*
|
{{- /*
|
||||||
Cardinality-check the namespaces/namespace variables
|
Cardinality-check the namespaces/namespace variables
|
||||||
|
@ -13,44 +13,44 @@ metadata:
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if and .Values.workflow.namespaces .Values.workflow.namespace }}
|
{{- if and .Values.workflow.namespaces .Values.workflow.namespace }}
|
||||||
{{- fail "Please set either workflow.namespaces or workflow.namespace for the service account, not both" }}
|
{{- fail "Please set either workflow.namespaces or workflow.namespace for the service account, not both" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if and ( not .Values.workflow.namespace ) ( not .Values.workflow.namespaces ) }}
|
{{- if and ( not .Values.workflow.namespace ) ( not .Values.workflow.namespaces ) }}
|
||||||
{{- fail "Please set either workflow.namespaces or workflow.namespace" }}
|
{{- fail "Please set either workflow.namespaces or workflow.namespace" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.workflow.namespaces }}
|
{{- if .Values.workflow.namespaces }}
|
||||||
|
|
||||||
{{- /*
|
{{- /*
|
||||||
Type-check the namespaces variable for being a list ("slice")
|
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.
|
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 ) }}
|
{{- if not ( kindIs "slice" .Values.workflow.namespaces ) }}
|
||||||
{{- fail ( printf "workflow.namespaces is a slice, got %s %s" ( kindOf .Values.workflow.namespaces ) .Values.workflow.namespaces ) }}
|
{{- fail ( printf "workflow.namespaces is a slice, got %s %s" ( kindOf .Values.workflow.namespaces ) .Values.workflow.namespaces ) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ $namespaces := .Values.workflow.namespaces }}
|
{{ $namespaces := .Values.workflow.namespaces }}
|
||||||
{{- range $namespaces }}
|
{{- range $namespaces }}
|
||||||
{{ $namespace := . }}
|
{{ $namespace := . }}
|
||||||
{{ include "sa-base" . }}
|
{{ include "sa-base" . }}
|
||||||
name: {{ $.Values.workflow.serviceAccount.name }}
|
name: {{ $.Values.workflow.serviceAccount.name }}
|
||||||
namespace: {{ $namespace }}
|
namespace: {{ $namespace }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
|
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|
||||||
{{- $namespaces := tuple .Values.workflow.namespace }}
|
{{- $namespaces := tuple .Values.workflow.namespace }}
|
||||||
{{- range $namespaces }}
|
{{- range $namespaces }}
|
||||||
{{- $namespace := . }}
|
{{- $namespace := . }}
|
||||||
{{ include "sa-base" . }}
|
{{ include "sa-base" . }}
|
||||||
name: {{ $.Values.workflow.serviceAccount.name }}
|
name: {{ $.Values.workflow.serviceAccount.name }}
|
||||||
namespace: {{ $namespace }}
|
namespace: {{ $namespace }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
|
{{- toYaml $.Values.workflow.serviceAccount.annotations | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue