Use `controller.NewContext`
@@ -64,7 +64,9 @@ func NewController(crd string, gvr schema.GroupVersionResource, gvk schema.Group
gvr: gvr,
crdName: crd,
}
- impl := controller.NewImpl(r, logger, ReconcilerName)
+ impl := controller.NewContext(ctx, r, controller.ControllerOptions{
+ Logger: logger, WorkQueueName: ReconcilerName,
+ })
sourceInformer.AddEventHandler(controller.HandleAll(impl.Enqueue))
