Skip to content

Commit 4a84a56

Browse files
authored
Merge pull request #1602 from gianlucam76/fix-crash
(bug) Handle crash in fetchResources
2 parents 609d685 + aa36792 commit 4a84a56

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/clusterops/validate_health.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ func validateHealthPolicy(ctx context.Context, remoteConfig *rest.Config, check
7979
return err
8080
}
8181

82+
// This can happen if the CRD is not present
83+
if list == nil {
84+
return nil
85+
}
86+
8287
if !isDelete {
8388
// dont fail for pre and post delete checks. Those checks are usually intended to verify
8489
// resources are gone

0 commit comments

Comments
 (0)