From 5d6309b941e6fe62216e1d853df5fc778b7bcc74 Mon Sep 17 00:00:00 2001 From: Jean-Francois Roy Date: Tue, 11 Jun 2024 11:36:53 -0700 Subject: [PATCH] fix: replace + with _ in Chart.Version When using Flux with the OCI chart, the chart version has a git hash suffix (ex: 1.0.107+20eb5010550b), which is invalid as a metadata label. --- deployments/kubernetes/chart/reloader/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployments/kubernetes/chart/reloader/templates/_helpers.tpl b/deployments/kubernetes/chart/reloader/templates/_helpers.tpl index 9edf6cade..04b3ee4d8 100644 --- a/deployments/kubernetes/chart/reloader/templates/_helpers.tpl +++ b/deployments/kubernetes/chart/reloader/templates/_helpers.tpl @@ -22,7 +22,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- define "reloader-labels.chart" -}} app: {{ template "reloader-fullname" . }} -chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" release: {{ .Release.Name | quote }} heritage: {{ .Release.Service | quote }} app.kubernetes.io/managed-by: {{ .Release.Service | quote }}