From f43a9ac3a015c4544b66474c8a60eb9582c6e049 Mon Sep 17 00:00:00 2001 From: sarnowski-defense-unicorns <165711146+sarnowski-defense-unicorns@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:23:31 -0600 Subject: [PATCH] [kube-state-metrics] Improve customLabels template flexibility (#4738) * Update 'Values.customLabels' templating in 'kube-state-metrics.labels' helper function to use tpl Signed-off-by: Samuel Sarnowski --------- Signed-off-by: Samuel Sarnowski --- charts/kube-state-metrics/Chart.yaml | 2 +- charts/kube-state-metrics/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/kube-state-metrics/Chart.yaml b/charts/kube-state-metrics/Chart.yaml index 04372097dff8..f33b075b7a14 100644 --- a/charts/kube-state-metrics/Chart.yaml +++ b/charts/kube-state-metrics/Chart.yaml @@ -7,7 +7,7 @@ keywords: - prometheus - kubernetes type: application -version: 5.22.0 +version: 5.22.1 appVersion: 2.13.0 home: https://github.com/kubernetes/kube-state-metrics/ sources: diff --git a/charts/kube-state-metrics/templates/_helpers.tpl b/charts/kube-state-metrics/templates/_helpers.tpl index a4358c87a106..3dd326da4ecd 100644 --- a/charts/kube-state-metrics/templates/_helpers.tpl +++ b/charts/kube-state-metrics/templates/_helpers.tpl @@ -66,7 +66,7 @@ app.kubernetes.io/part-of: {{ template "kube-state-metrics.name" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} {{- if .Values.customLabels }} -{{ toYaml .Values.customLabels }} +{{ tpl (toYaml .Values.customLabels) . }} {{- end }} {{- if .Values.releaseLabel }} release: {{ .Release.Name }}