kubewarden-controller icon indicating copy to clipboard operation
kubewarden-controller copied to clipboard

Be explicity about the synchronization time of our reconciliation loops

Open flavio opened this issue 1 year ago • 0 comments

We're currently using controller-runtime version 0.14.6. When creating the Manager we give to it some configuration Options, see here

One of the values of the Manager Options is called SyncPeriod. Since we don't specify anything, we will have an automatic sync interval of 10 hours. Meaning, even if there's no event affecting one of our watched resources, we will still have a sync every 10 hours.

This configuration parameter has been moved to another location inside of the latest release of controller-runtime. Now this is one of the configuration values of the cache. The behaviour stays the same: every 10 hours you get a full sync.

We can rely on this 10 hours sync, but we would prefer to be more explicit inside of our reconciliation loops by returning a reconcile.Result{RequeueAfter: t} instead of a reconcile.Result{}.

flavio avatar Sep 22 '23 13:09 flavio