From 6bcc7fbb8d2c5974fca262dfa45a86096c764135 Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Wed, 29 Apr 2020 09:24:08 +0200 Subject: [PATCH] helpers: escape name Signed-off-by: Yoan Blanc --- pkg/chartutil/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 0e87c7b47..aa380588e 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -66,7 +66,7 @@ const ( const sep = string(filepath.Separator) const defaultChartfile = `apiVersion: v2 -name: %s +name: %q description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. @@ -435,7 +435,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define ".selectorLabels" -}} -app.kubernetes.io/name: {{ include ".name" . }} +app.kubernetes.io/name: {{ include ".name" . | toJson }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }}