mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
19 lines
718 B
Smarty
19 lines
718 B
Smarty
{{/*
|
|
Convert StatefulSet values to an object
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.statefulset.valuesToObject" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $identifier := .id -}}
|
|
{{- $objectValues := .values -}}
|
|
{{- $itemCount := .itemCount -}}
|
|
|
|
{{- $objectName := (include "bjw-s.common.lib.determineResourceNameFromValues" (dict "rootContext" $rootContext "id" $identifier "values" $objectValues "itemCount" $itemCount)) -}}
|
|
|
|
{{- $_ := set $objectValues "name" $objectName -}}
|
|
{{- $_ := set $objectValues "identifier" $identifier -}}
|
|
|
|
{{- $strategy := default "RollingUpdate" $objectValues.strategy -}}
|
|
{{- $_ := set $objectValues "strategy" $strategy -}}
|
|
|
|
{{- $objectValues | toYaml -}}
|
|
{{- end -}}
|