Create reusable Requeue functions for the Reconcile loop
Summary
At many points in our Reconcile loop, we return in a few ways depending on whether we want to requeue:
-
return ctrl.Result{}, errto requeue -
reutrn ctrl.Result{}, nilto not requeue -
return ctrl.Result{RequeueAfter: waitInterval}, nilto requeue after the specified wait period
References
-
https://cloud.redhat.com/blog/7-best-practices-for-writing-kubernetes-operators-an-sre-perspective
- Point 7:
Reconciling Return Values
- Point 7:
Acceptance criteria
-
Functions are created for common reconcile loop returns -
Functions are implemented in the reconcile loop
Edited by Mitchell Nielsen