mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Use built-in toYaml
This commit is contained in:
@@ -14,15 +14,3 @@ We truncate at 24 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "toYaml" -}}
|
||||
{{- range $key, $value := . -}}
|
||||
{{- $map := kindIs "map" $value -}}
|
||||
{{- if $map }}
|
||||
{{ $key }}:
|
||||
{{- include "toYaml" $value | indent 2 }}
|
||||
{{- else }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -22,4 +22,4 @@ spec:
|
||||
- "volunteer"
|
||||
- "--cluster-id={{ uuidv4 | default .Values.uuid }}"
|
||||
resources:
|
||||
{{ include "toYaml" .Values.resources | indent 12 }}
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
|
||||
Reference in New Issue
Block a user