From fd09588b1b3ae7330dafb3142bea59b76a47e92f Mon Sep 17 00:00:00 2001 From: Renato Monteiro <45536168+monteiro-renato@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:16:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Remove=20extra=20space=20?= =?UTF-8?q?before=20the=20labels=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scaffolds/internal/templates/chart-templates/helpers_tpl.go | 2 +- .../project-v4-with-plugins/dist/chart/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/helpers_tpl.go b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/helpers_tpl.go index 61e312bb607..bf50dcdb691 100644 --- a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/helpers_tpl.go +++ b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/helpers_tpl.go @@ -62,7 +62,7 @@ const helmHelpersTemplate = `{{` + "`" + `{{- define "chart.name" -}}` + "`" + ` Common labels for the chart. */}} {{` + "`" + `{{- define "chart.labels" -}}` + "`" + `}} -{{` + "`" + `{{- if .Chart.AppVersion }}` + "`" + `}} +{{` + "`" + `{{- if .Chart.AppVersion -}}` + "`" + `}} app.kubernetes.io/version: {{` + "`" + `{{ .Chart.AppVersion | quote }}` + "`" + `}} {{` + "`" + `{{- end }}` + "`" + `}} {{` + "`" + `{{- if .Chart.Version }}` + "`" + `}} diff --git a/testdata/project-v4-with-plugins/dist/chart/templates/_helpers.tpl b/testdata/project-v4-with-plugins/dist/chart/templates/_helpers.tpl index 66d7523b70b..7a8ff9aa477 100644 --- a/testdata/project-v4-with-plugins/dist/chart/templates/_helpers.tpl +++ b/testdata/project-v4-with-plugins/dist/chart/templates/_helpers.tpl @@ -14,7 +14,7 @@ {{- define "chart.labels" -}} -{{- if .Chart.AppVersion }} +{{- if .Chart.AppVersion -}} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} {{- if .Chart.Version }}