From e2013110a4f09a765167e9c51d8302365ee472eb Mon Sep 17 00:00:00 2001 From: Andrii Chubatiuk Date: Wed, 9 Oct 2024 12:18:56 +0300 Subject: [PATCH] fail if crd.cleanup.image.tag is not string --- charts/victoria-metrics-operator/templates/uninstall_hook.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/victoria-metrics-operator/templates/uninstall_hook.yaml b/charts/victoria-metrics-operator/templates/uninstall_hook.yaml index 96ffd6b5d..b55c355ee 100644 --- a/charts/victoria-metrics-operator/templates/uninstall_hook.yaml +++ b/charts/victoria-metrics-operator/templates/uninstall_hook.yaml @@ -9,6 +9,8 @@ {{- if empty ($app.image).tag }} {{- $tag := (printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor) | replace "+" "" -}} {{- $_ := set $app.image "tag" $tag }} +{{- else if not (kindIs "string" ($app.image).tag) }} + {{- fail "`crd.cleanup.image.tag` is not string, most probably you need to enquote provided value" -}} {{- end }} --- apiVersion: batch/v1