Skip to content

deprecate requeue: true #2554

@ruanxin

Description

@ruanxin

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
  • 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

No one assigned

    Labels

    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions