mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
fix(common): adding feature flag for default serviceaccount name (#360)
This commit is contained in:
parent
3e2f1204e0
commit
f111be38e9
7 changed files with 89 additions and 17 deletions
|
@ -7,8 +7,12 @@ Returns the value for serviceAccountName
|
|||
|
||||
{{- $serviceAccountName := "default" -}}
|
||||
|
||||
{{- if (get (include "bjw-s.common.lib.serviceAccount.getByIdentifier" (dict "rootContext" $rootContext "id" "default") | fromYaml) "create") -}}
|
||||
{{- $serviceAccountName = get (include "bjw-s.common.lib.serviceAccount.getByIdentifier" (dict "rootContext" $rootContext "id" "default") | fromYaml) "name" -}}
|
||||
{{- if $rootContext.Values.enforceServiceAccountCreation -}}
|
||||
{{- if (get (include "bjw-s.common.lib.serviceAccount.getByIdentifier" (dict "rootContext" $rootContext "id" "default") | fromYaml) "create") -}}
|
||||
{{- $serviceAccountName = get (include "bjw-s.common.lib.serviceAccount.getByIdentifier" (dict "rootContext" $rootContext "id" "default") | fromYaml) "name" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $serviceAccountName = get (include "bjw-s.common.lib.serviceAccount.getByIdentifier" (dict "rootContext" $rootContext "id" "default") | fromYaml) "name" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $controllerObject.serviceAccount -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue