From 99d251afa7a7091782a5c4856d1b7a569c1c06ec Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Wed, 26 Mar 2025 11:25:47 +0100 Subject: [PATCH] Don't remove, but rather shorten --- templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index fb5900b..d07e2ad 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -48,7 +48,7 @@ helm.sh/chart: {{ include "mastodon.chart" . }} {{ include "mastodon.selectorLabels" . }} {{ include "mastodon.globalLabels" . }} {{- if .Values.image.tag }} -app.kubernetes.io/version: {{ regexReplaceAll "@[a-zA-Z0-9:]+" .Values.image.tag "" | quote }} +app.kubernetes.io/version: {{ regexReplaceAll "@(\\w+:\\w{0,7})\\w*" .Values.image.tag "@${1}" | quote }} {{- else if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }}