From 4f33830bfa7eb45897e3ee11dd0385ce6ba3e400 Mon Sep 17 00:00:00 2001 From: Thomas O'Donnell Date: Wed, 5 Aug 2020 19:02:42 +0200 Subject: [PATCH] Update Common Lables template in starter chart Have update the Common Labels template in the starter chart so that the value for the `app.kubernetes.io/version` is set to the same value as the image tag used in the deployment. Signed-off-by: Thomas O'Donnell --- pkg/chartutil/create.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 6e382b961..8d8f48176 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -425,9 +425,7 @@ Common labels {{- define ".labels" -}} helm.sh/chart: {{ include ".chart" . }} {{ include ".selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} +app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end }}