mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37: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
|
@ -5,7 +5,11 @@ Return a ServiceAccount Object by its Identifier.
|
|||
{{- $rootContext := .rootContext -}}
|
||||
{{- $identifier := .id -}}
|
||||
{{- if eq $identifier "default" -}}
|
||||
{{- include "bjw-s.common.lib.serviceAccount.valuesToObject" (dict "rootContext" $rootContext "id" "default" "values" $rootContext.Values.serviceAccount) -}}
|
||||
{{- $serviceAccount := deepCopy $rootContext.Values.serviceAccount -}}
|
||||
{{- if and (eq ($serviceAccount.name) "") (not $serviceAccount.create ) -}}
|
||||
{{- $_ := set $serviceAccount "name" "default" -}}
|
||||
{{- end -}}
|
||||
{{- include "bjw-s.common.lib.serviceAccount.valuesToObject" (dict "rootContext" $rootContext "id" "default" "values" $serviceAccount) -}}
|
||||
{{- else -}}
|
||||
{{- $serviceAccountValues := dig "extraServiceAccounts" $identifier nil $rootContext.Values.serviceAccount -}}
|
||||
{{- if not (empty $serviceAccountValues) -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue