From 8c822401862d4c563cb53da6fcd5c9d421628210 Mon Sep 17 00:00:00 2001 From: Laszlo Fogas Date: Wed, 8 Sep 2021 11:31:17 +0200 Subject: [PATCH] Making label names robust --- charts/cron-job/templates/_helpers.tpl | 2 +- charts/onechart/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cron-job/templates/_helpers.tpl b/charts/cron-job/templates/_helpers.tpl index 43f1520..684da14 100644 --- a/charts/cron-job/templates/_helpers.tpl +++ b/charts/cron-job/templates/_helpers.tpl @@ -48,7 +48,7 @@ Selector labels */}} {{- define "helm-chart.selectorLabels" -}} app.kubernetes.io/name: {{ include "helm-chart.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/instance: {{ template "robustName" .Release.Name }} {{- end }} {{/* diff --git a/charts/onechart/templates/_helpers.tpl b/charts/onechart/templates/_helpers.tpl index 9c5df3c..f6fe416 100644 --- a/charts/onechart/templates/_helpers.tpl +++ b/charts/onechart/templates/_helpers.tpl @@ -48,7 +48,7 @@ Selector labels */}} {{- define "helm-chart.selectorLabels" -}} app.kubernetes.io/name: {{ include "helm-chart.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/instance: {{ template "robustName" .Release.Name }} {{- end }} {{/*