mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
20 lines
661 B
Smarty
20 lines
661 B
Smarty
{{/*
|
|
Convert Secret values to an object
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.serviceAccount.valuesToObject" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $objectValues := .values -}}
|
|
|
|
{{- /* Determine and inject the serviceAccount name */ -}}
|
|
{{- $objectName := (include "bjw-s.common.lib.chart.names.fullname" $rootContext) -}}
|
|
|
|
{{- if $objectValues.name -}}
|
|
{{- $objectName = $objectValues.name -}}
|
|
{{- end -}}
|
|
{{- $_ := set $objectValues "name" $objectName -}}
|
|
{{- $_ := set $objectValues "identifier" $identifier -}}
|
|
|
|
{{- /* Return the serviceAccount object */ -}}
|
|
{{- $objectValues | toYaml -}}
|
|
{{- end -}}
|