-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.
type Reconciler interface {
OnRevisionReconciled(rev statedb.Revision, callback func(statedb.Revision))
}