Skip to content
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

Optimizing CR processing after Kubernetes CRD controller restart #3067

Open
lingdie opened this issue Jan 13, 2025 · 1 comment
Open

Optimizing CR processing after Kubernetes CRD controller restart #3067

lingdie opened this issue Jan 13, 2025 · 1 comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants