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 -}}