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.
This commit is contained in:
Jean-Francois Roy
2024-06-11 11:36:55 -07:00
parent 8595b4ac43
commit 5d6309b941
@@ -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 }}