File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,17 @@ func mightHaveInferredOwner(r *Resource) bool {
20
20
21
21
func (c * clusterCache ) resolveResourceReferences (un * unstructured.Unstructured ) ([]metav1.OwnerReference , func (kube.ResourceKey ) bool ) {
22
22
var isInferredParentOf func (_ kube.ResourceKey ) bool
23
- ownerRefs := un .GetOwnerReferences ()
23
+ allOwnerRefs := un .GetOwnerReferences ()
24
24
gvk := un .GroupVersionKind ()
25
25
26
+ // TODO: Put this behind a gate
27
+ ownerRefs := []metav1.OwnerReference {}
28
+ for _ , ownerRef := range allOwnerRefs {
29
+ if ownerRef .Controller != nil && * ownerRef .Controller {
30
+ ownerRefs = append (ownerRefs , ownerRef )
31
+ }
32
+ }
33
+
26
34
switch {
27
35
28
36
// Special case for endpoint. Remove after https://github.com/kubernetes/kubernetes/issues/28483 is fixed
You can’t perform that action at this time.
0 commit comments