From f0bff16ff7ff6c0caac537749923685cab0bc3b5 Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Sun, 23 Oct 2016 16:42:18 -0500 Subject: [PATCH] Use built-in toYaml --- stable/spartakus/templates/_helpers.tpl | 12 ------------ stable/spartakus/templates/deployment.yaml | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/stable/spartakus/templates/_helpers.tpl b/stable/spartakus/templates/_helpers.tpl index db2ea7c874..234480de71 100644 --- a/stable/spartakus/templates/_helpers.tpl +++ b/stable/spartakus/templates/_helpers.tpl @@ -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 -}} diff --git a/stable/spartakus/templates/deployment.yaml b/stable/spartakus/templates/deployment.yaml index 6db8857d3e..b2463880c4 100644 --- a/stable/spartakus/templates/deployment.yaml +++ b/stable/spartakus/templates/deployment.yaml @@ -22,4 +22,4 @@ spec: - "volunteer" - "--cluster-id={{ uuidv4 | default .Values.uuid }}" resources: - {{ include "toYaml" .Values.resources | indent 12 }} +{{ toYaml .Values.resources | indent 12 }}