-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Description
Description
The requeue has been deprecated in the latest controller-runtime. kubernetes-sigs/controller-runtime#3107, the recommended replacement is RequeueAfter. However, unlike Requeue, using RequeueAfter bypasses the built-in rate-limiting mechanism. This poses a potential performance risk—especially if a large number of items hit the same short RequeueAfter interval—leading to high reconciliation pressure.
DevNotes:
We have a shared RateLimiter defined, we can introduce this as a field for each controller, for the requeue case, refactor them to return ctrl.Result{RequeueAfter: r.rateLimiter.When(req)}, nil
Reasons
No response
Acceptance Criteria
- When there is a non-nil err to return, replace with
return ctrl.Result{}, err- make sure
updateStatusWithErroralways return error(it should return the passed-in error always probably)return ctrl.Result{Requeue: true}, r.updateStatusWithError(ctx, kyma, err)
- make sure
- replacing the rest with requeueAfter by ratelimit:
return ctrl.Result{RequeueAfter: r.rateLimiter.When(req)}, nil
Feature Testing
No response
Testing approach
No response
Attachments
No response
Metadata
Metadata
Assignees
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.