initial commit

This commit is contained in:
2025-10-01 11:01:48 +02:00
commit c5408f5e17
9 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{{- define "common.tplvalues.render" -}}
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
{{- if contains "{{" (toJson .value) }}
{{- if .scope }}
{{ tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
{{- else }}
{{ tpl $value .context }}
{{- end }}
{{- else }}
{{ $value }}
{{- end }}
{{- end }}
{{- define "common.tplvalues.merge" }}
{{- $dst := dict }}
{{- range .values }}
{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | merge $dst }}
{{- end }}
{{ $dst | toYaml }}
{{- end }}
{{- define "common.tplvalues.merge-overwrite" }}
{{- $dst := dict }}
{{- range .values }}
{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst }}
{{- end }}
{{ $dst | toYaml }}
{{- end }}