[stable/prometheus] semver compatible chart versioning breaks chart label. (#18411)

Signed-off-by: Erhan Kesken <erhankesken@gmail.com>
This commit is contained in:
Erhan Kesken
2019-12-06 06:54:50 -08:00
committed by Kubernetes Prow Robot
parent a1de38d24d
commit 7f2ce76723
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: prometheus
version: 9.3.2
version: 9.3.3
appVersion: 2.13.1
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
+8 -1
View File
@@ -6,6 +6,13 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "prometheus.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create unified labels for prometheus components
*/}}
@@ -15,7 +22,7 @@ release: {{ .Release.Name }}
{{- end -}}
{{- define "prometheus.common.metaLabels" -}}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
chart: {{ template "prometheus.chart" . }}
heritage: {{ .Release.Service }}
{{- end -}}