Skip to content

Optimizing CR processing after Kubernetes CRD controller restart #3067

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

Closed
lingdie opened this issue Jan 13, 2025 · 2 comments
Closed

Optimizing CR processing after Kubernetes CRD controller restart #3067

lingdie opened this issue Jan 13, 2025 · 2 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@lingdie
Copy link

lingdie commented Jan 13, 2025

I'm working with a Kubernetes Custom Resource Definition (CRD) controller. I've noticed that when the controller restarts, it attempts to reconcile all existing Custom Resources (CRs). This process causes a delay in processing newly created CRs.

My questions are:

  1. What are the best practices to mitigate this delay in processing new CRs after a controller restart?

  2. Does the controller-runtime library provide any built-in mechanisms to implement a priority queue or similar functionality to prioritize the processing of new CRs?

  3. If controller-runtime doesn't offer such functionality, what are some effective ways to implement a priority system within the reconciliation loop?

  4. Are there any performance considerations or potential drawbacks to implementing a priority system in a CRD controller?

I'm particularly interested in solutions that can be implemented using Go and the controller-runtime library. Any insights, code examples, or best practices would be greatly appreciated.

@sbueringer
Copy link
Member

Great timing 😃. I would recommend trying #2374 once v0.20 is out

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 13, 2025
@lingdie lingdie closed this as completed Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants