-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reconciler: Provide ability to check if updates up to a certain revision has been reconciled #58
Comments
Here's some thoughts:
|
Answering a bit out of order:
I suggested a callback exactly because I originally experimented with an approach where I had a condvar and one go routine per "wait for revision" query. I think for the metrics use-case that is too much overhead. I'm fine with it being observable instead of a callback, but I'd like to avoid having to spawn one Go routine per queried revision. -- The use cases I have in mind all boil down to:
I think this is a really common pattern.
Yes, but if we don't do that, then we are just offloading the bookkeeping to the client. Someone has to do the work. Let's take the From the control-plane's perspective it would be much simpler to obtain the final revision at step X and ask the reconciler if that revision has been processed. In particular, the reconciler would only have to track retries, which arguable a much smaller set than the total set of updates and deletions that the control-plane would have to track.
I absolutely agree. I've played around with multiple implementations on top of the |
In Cilium, various policy related subsystems need to wait for datapath updates to be plumbed through before certain other actions can happen. For example, DNS responses that allow IPs in a
toFQDN
policies only must be released once the IP's identity has been added to the BPF policy map. Another usecase is metrics, where it would be interesting to know how long it took for a certain revision of the table to be reconciled (which might expose potential bottlenecks).When using the generic reconciler to reconcile BPF maps, this is currently very hard to implement such as logic on top of the reconciler API: Simply checking if the table has no pending entries is not sufficient, since deletions might still have to be reconciled. In addition, retries make it hard to track progress via the
Operations
interfaces, since it basically requires the tracker to track what retries are still in flight (and detect if they have been cancelled).Therefore, it would be great if the reconciler had the built-in ability to check if all changes up to a certain revision have been reconciled. This could take the form of a callback mechanism, e.g.
The text was updated successfully, but these errors were encountered: