File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
2222 "k8s.io/client-go/util/workqueue"
2323 "sigs.k8s.io/controller-runtime/pkg/event"
2424 "sigs.k8s.io/controller-runtime/pkg/reconcile"
25+ "sigs.k8s.io/controller-runtime/pkg/runtime/inject"
2526)
2627
2728var _ EventHandler = & EnqueueRequestsFromMapFunc {}
@@ -68,6 +69,16 @@ func (e *EnqueueRequestsFromMapFunc) mapAndEnqueue(q workqueue.RateLimitingInter
6869 }
6970}
7071
72+ // EnqueueRequestsFromMapFunc can inject fields into the mapper.
73+
74+ // InjectFunc implements inject.Injector.
75+ func (e * EnqueueRequestsFromMapFunc ) InjectFunc (f inject.Func ) error {
76+ if f == nil {
77+ return nil
78+ }
79+ return f (e .ToRequests )
80+ }
81+
7182// Mapper maps an object to a collection of keys to be enqueued
7283type Mapper interface {
7384 // Map maps an object
You can’t perform that action at this time.
0 commit comments