Currently, we are calling Watch() on Resources in NumaflowControllerRollout here but we also have these same resources being cached by the gitops-engine.
There is a call to clusterCache.OnResourceUpdated() in sync/cache.go. This uses a callback. We would need to make sure that we safely call the same reconciliation code that is being used by Reconcile(), such that only one NumaflowControllerRollout is being processed at a time. Thus, we would probably need to use a workqueue.RateLimitingInterface where both Reconcile() and this callback add to that queue (similar to what we're planning for PipelineRollout).
Currently, we are calling
Watch()
on Resources in NumaflowControllerRollout here but we also have these same resources being cached by the gitops-engine.There is a call to clusterCache.OnResourceUpdated() in
sync/cache.go
. This uses a callback. We would need to make sure that we safely call the same reconciliation code that is being used by Reconcile(), such that only one NumaflowControllerRollout is being processed at a time. Thus, we would probably need to use aworkqueue.RateLimitingInterface
where bothReconcile()
and this callback add to that queue (similar to what we're planning for PipelineRollout).