Controller runnables based on the IncrementalInformer func ("delta" reconciliation mode) propagate events twice – once synchronously, right after modifying the cache (1), and a second time, async, via subscription to the watchable cache map (2).
The StateReconciler, on the other hand, does not duplicate events.
Create/update/delete functions of the controller should not propagate the event directly, but let the cache watcher to propagate to the subscriber. As a side effect, due to limitations of telepresenceio/watchable, all update events will be reported as create.
Controller runnables based on the
IncrementalInformer
func ("delta" reconciliation mode) propagate events twice – once synchronously, right after modifying the cache (1), and a second time, async, via subscription to the watchable cache map (2).create: https://github.com/Kuadrant/policy-machinery/blob/e963418c9566a5e61acdd766c6109d3f0c147222/controller/controller.go#L225 update: https://github.com/Kuadrant/policy-machinery/blob/e963418c9566a5e61acdd766c6109d3f0c147222/controller/controller.go#L237 delete: https://github.com/Kuadrant/policy-machinery/blob/e963418c9566a5e61acdd766c6109d3f0c147222/controller/controller.go#L245
cache subscriber: https://github.com/Kuadrant/policy-machinery/blob/e963418c9566a5e61acdd766c6109d3f0c147222/controller/controller.go#L263
The
StateReconciler
, on the other hand, does not duplicate events.Create/update/delete functions of the controller should not propagate the event directly, but let the cache watcher to propagate to the subscriber. As a side effect, due to limitations of telepresenceio/watchable, all update events will be reported as create.