From 1d6a94f138bf0b4326fc8516aa645c5f61626542 Mon Sep 17 00:00:00 2001 From: David Rabkin Date: Mon, 12 Aug 2024 23:06:18 +0300 Subject: [PATCH] GetOwnerReferences does not return error (#2333) --- pkg/podhelper/podhelper.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/podhelper/podhelper.go b/pkg/podhelper/podhelper.go index 7301eda51..dd47dc3dd 100644 --- a/pkg/podhelper/podhelper.go +++ b/pkg/podhelper/podhelper.go @@ -40,9 +40,6 @@ func followOwnerReferences(resourceList []*metav1.APIResourceList, dynamicClient } // Get owner references of the unstructured object ownerReferences := resource.GetOwnerReferences() - if err != nil { - return fmt.Errorf("error getting owner references. err= %s", err) - } // if no owner references, we have reached the top record it if len(ownerReferences) == 0 { topOwners[ownerRef.Name] = TopOwner{Kind: ownerRef.Kind, Name: ownerRef.Name, Namespace: namespace}