mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
12 lines
488 B
Smarty
12 lines
488 B
Smarty
{{/*
|
|
Return a ServiceAccount Object by its Identifier.
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.serviceAccount.getByIdentifier" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $enabledServiceAccounts := (include "bjw-s.common.lib.serviceAccount.enabledServiceAccounts" (dict "rootContext" $rootContext) | fromYaml ) }}
|
|
|
|
{{- if (hasKey $enabledServiceAccounts $identifier) -}}
|
|
{{- get $enabledServiceAccounts $identifier | toYaml -}}
|
|
{{- end -}}
|
|
{{- end -}}
|