-
Notifications
You must be signed in to change notification settings - Fork 1.2k
⚠️ Deprecate reconcile.Result.Requeue
#3107
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
Conversation
There is no good reason to use this setting, either an error or `RequeueAfter` should be used instead. Deprecate it to avoid confusion.
f77b6d0
to
f15ff17
Compare
I just want to bring up some cases when requeue helped us in Cluster API When a reconcile loop is depending on external objects that you cannot actively watch, having in controller runtime an option to requeue with an exponential backoff (without raising an error) helped CAPI to ensure a good reactivity of the system without overload it. When we tried to use RequeueAfter for similar use cases instead we faced a few issues:
Note. In our experience the current implementation of requeue works when things in the external system happens quickly, less when the exponential backoff was getting too high. |
Right, but wouldn't it be a lot better to set up your ratelimiter for this and use what interval it emits in |
What exists today in controller runtime worked for use in most cases, and this was enough for us in Cluster API to avoid creating our own custom rate limiter (having to implement one will be a step back). Looking at this from another angle, if CR runtime is going to provide as a building block a rated limiter to use in controller with requreAfter, then the impact of deprecation/removal of requeue will be less relevant. |
Not controller-runtime itself, but there are ratelimiters in the upstream workqueue package: https://pkg.go.dev/k8s.io/client-go/util/workqueue |
@alvaroaleman thanks for sharing your PoV, appreciated |
/lgtm /hold |
LGTM label has been added. Git tree hash: 03aec75ade1ae9ba8d53fba906b118608bc4e2b6
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
FWIW, we also thought the use of |
There is no good reason to use this setting, either an error or
RequeueAfter
should be used instead. Deprecate it to avoid confusion. From the godoc: