From 758d48e209963cad7dfc82f5c1afcb8447a96fad Mon Sep 17 00:00:00 2001 From: Maksim Poliakov Date: Thu, 19 Mar 2026 23:13:42 +0300 Subject: [PATCH] fix(customresourcestate): log when configured CRD is not installed in cluster --- pkg/customresourcestate/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/customresourcestate/config.go b/pkg/customresourcestate/config.go index a9e47614a8..0843789ff6 100644 --- a/pkg/customresourcestate/config.go +++ b/pkg/customresourcestate/config.go @@ -191,6 +191,8 @@ func FromConfig(decoder ConfigDecoder, discovererInstance *discovery.CRDiscovere resolvedSet /* GVKPs */, err := discovererInstance.ResolveGVKToGVKPs(schema.GroupVersionKind(resource.GroupVersionKind)) if err != nil { klog.ErrorS(err, "failed to resolve GVK", "gvk", resource.GroupVersionKind) + } else if len(resolvedSet) == 0 { + klog.InfoS("CRD for resource is not installed in the cluster, skipping", "gvk", resource.GroupVersionKind) } for _, resolved /* GVKP */ := range resolvedSet { // Set their G** attributes to various resolutions of the GVK.