From 89bcb5caca35d4fc468665c7a4407b0410fa389a Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Mon, 26 Feb 2024 20:07:37 +0100 Subject: [PATCH] I doubt the crd lookup would return a list... --- library/common/templates/lib/util/_verify_crd.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/common/templates/lib/util/_verify_crd.tpl b/library/common/templates/lib/util/_verify_crd.tpl index 3e75b9d2..f408b883 100644 --- a/library/common/templates/lib/util/_verify_crd.tpl +++ b/library/common/templates/lib/util/_verify_crd.tpl @@ -5,7 +5,7 @@ {{- $lookupMiddlewares := (lookup "apiextensions.k8s.io/v1" "CustomResourceDefinition" "" $crd) -}} {{/* If there are items, re-assign the variable */}} - {{- if and $lookupMiddlewares $lookupMiddlewares.items -}} + {{- if $lookupMiddlewares -}} {{- else -}} {{- fail (printf "%s have to be installed first" $missing) -}} {{- end -}}