From 42c979f00f8081e944cd8619a2be7d25933e2fd8 Mon Sep 17 00:00:00 2001 From: Andrii Melnyk <8135246+a-melnyk@users.noreply.github.com> Date: Fri, 17 Apr 2020 02:07:07 +0200 Subject: [PATCH] prefer .Values.image.tag over .Chart.AppVersion for "app.kubernetes.io/version" label (#21965) Signed-off-by: Andrii Melnyk <8135246+a-melnyk@users.noreply.github.com> --- stable/grafana/Chart.yaml | 2 +- stable/grafana/templates/_helpers.tpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 1e22e8ba19..10eb67d9de 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 5.0.12 +version: 5.0.13 appVersion: 6.7.1 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/templates/_helpers.tpl b/stable/grafana/templates/_helpers.tpl index 6b08bd1af4..cbe4f60866 100644 --- a/stable/grafana/templates/_helpers.tpl +++ b/stable/grafana/templates/_helpers.tpl @@ -67,8 +67,8 @@ Common labels {{- define "grafana.labels" -}} helm.sh/chart: {{ include "grafana.chart" . }} {{ include "grafana.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- if or .Chart.AppVersion .Values.image.tag }} +app.kubernetes.io/version: {{ .Values.image.tag | default .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}}