Use built-in toYaml

This commit is contained in:
Michael Goodness
2016-10-23 16:42:18 -05:00
parent 81d364cdf1
commit f0bff16ff7
2 changed files with 1 additions and 13 deletions
-12
View File
@@ -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 -}}
+1 -1
View File
@@ -22,4 +22,4 @@ spec:
- "volunteer"
- "--cluster-id={{ uuidv4 | default .Values.uuid }}"
resources:
{{ include "toYaml" .Values.resources | indent 12 }}
{{ toYaml .Values.resources | indent 12 }}