From 1922085ba7b389f3176b5f9da9ea77025f2243d3 Mon Sep 17 00:00:00 2001 From: Faisal Memon Date: Tue, 23 May 2023 08:59:21 -0700 Subject: [PATCH] Fix hooks for K3s (#305) Co-authored-by: kfox1111 --- charts/spire/charts/spire-server/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/spire/charts/spire-server/templates/_helpers.tpl b/charts/spire/charts/spire-server/templates/_helpers.tpl index c085b4f..af1e652 100644 --- a/charts/spire/charts/spire-server/templates/_helpers.tpl +++ b/charts/spire/charts/spire-server/templates/_helpers.tpl @@ -109,7 +109,7 @@ Create the name of the service account to use {{- $root := deepCopy . }} {{- $tag := (default $root.image.tag $root.image.version) | toString }} {{- if eq (len $tag) 0 }} -{{- $_ := set $root.image "tag" $root.KubeVersion }} +{{- $_ := set $root.image "tag" (regexReplaceAll "^(v?\\d+\\.\\d+\\.\\d+).*" $root.KubeVersion "${1}") }} {{- end }} {{- include "spire-lib.image" $root }} {{- end }}