2

I am wondering if there is a way to check how often reconciliation loop is run when an operator is built using Kubebuilder?

Thanks.

user3267989
  • 299
  • 3
  • 18
  • Have you looked at https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern ? You can expose metrics to prometheus relating to reconciliation (see https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/pull/98 ) – Galletti_Lance Apr 28 '22 at 13:40

1 Answers1

1

The reconciliation loop is run on any state change for the object being watched and also by default every 10 hours.

This periodic run of 10 hours is controlled by the SyncPeriod option while creating the controller-runtime manager.

You can also requeue the reconciliation for a object by appropriately setting the ctrl.Result return value.

Akash Jain
  • 23
  • 6