-
|
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:
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi there, I think the feature you're describing corresponds pretty well to this: kubernetes-sigs/controller-runtime#2374 It's already usable even though it's currently an opt-in feature and we use operators in production with this feature enabled. It allows for "0-downtime" rollout of the operator (in a way that new CR will be reconciled before the existing CRs sync finished) and in our case worked without any other considerations. Also, in an event handler, where you have the queue, you can add items to the queue with a certain priority as an option. PS: The feature should become default in the next release according to: kubernetes-sigs/controller-runtime#3332 |
Beta Was this translation helpful? Give feedback.
Hi there, I think the feature you're describing corresponds pretty well to this: kubernetes-sigs/controller-runtime#2374
It's already usable even though it's currently an opt-in feature and we use operators in production with this feature enabled. It allows for "0-downtime" rollout of the operator (in a way that new CR will be reconciled before the existing CRs sync finished) and in our case worked without any other considerations.
Also, in an event handler, where you have the queue, you can add items to the queue with a certain priority as an option.
PS: The feature should become default in the next release according to: kubernetes-sigs/controller-runtime#3332