diff --git a/pkg/handler/enqueue_owner.go b/pkg/handler/enqueue_owner.go index 80cb27c1b4..e8fc8eb46e 100644 --- a/pkg/handler/enqueue_owner.go +++ b/pkg/handler/enqueue_owner.go @@ -48,7 +48,7 @@ type OwnerOption func(e enqueueRequestForOwnerInterface) // // - a handler.enqueueRequestForOwner EventHandler with an OwnerType of ReplicaSet and OnlyControllerOwner set to true. func EnqueueRequestForOwner(scheme *runtime.Scheme, mapper meta.RESTMapper, ownerType client.Object, opts ...OwnerOption) EventHandler { - return WithLowPriorityWhenUnchanged(TypedEnqueueRequestForOwner[client.Object](scheme, mapper, ownerType, opts...)) + return TypedEnqueueRequestForOwner[client.Object](scheme, mapper, ownerType, opts...) } // TypedEnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created @@ -72,7 +72,7 @@ func TypedEnqueueRequestForOwner[object client.Object](scheme *runtime.Scheme, m for _, opt := range opts { opt(e) } - return e + return WithLowPriorityWhenUnchanged(e) } // OnlyControllerOwner if provided will only look at the first OwnerReference with Controller: true. diff --git a/pkg/handler/eventhandler_test.go b/pkg/handler/eventhandler_test.go index 38f76dab37..7cf5076e7c 100644 --- a/pkg/handler/eventhandler_test.go +++ b/pkg/handler/eventhandler_test.go @@ -798,6 +798,16 @@ var _ = Describe("Eventhandler", func() { ) }, }, + { + name: "TypedEnqueueRequestForOwner", + handler: func() handler.EventHandler { + return handler.TypedEnqueueRequestForOwner[client.Object]( + scheme.Scheme, + mapper, + &corev1.Pod{}, + ) + }, + }, { name: "Funcs", handler: func() handler.EventHandler {