From aa36792c7c1662b760fda86e1c145700577e4815 Mon Sep 17 00:00:00 2001 From: Gianluca Mardente Date: Tue, 3 Feb 2026 16:47:42 +0100 Subject: [PATCH] (bug) Handle crash in fetchResources --- lib/clusterops/validate_health.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/clusterops/validate_health.go b/lib/clusterops/validate_health.go index 8d8461d1..ab9c89bf 100644 --- a/lib/clusterops/validate_health.go +++ b/lib/clusterops/validate_health.go @@ -79,6 +79,11 @@ func validateHealthPolicy(ctx context.Context, remoteConfig *rest.Config, check return err } + // This can happen if the CRD is not present + if list == nil { + return nil + } + if !isDelete { // dont fail for pre and post delete checks. Those checks are usually intended to verify // resources are gone