-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Controller concurrency appears to cause reconciliations to be skipped #1322
Comments
Thanks for the report. If true, this is not intentional. At most what you should expect to see is deduplication of the objects that are queued to run (i.e. if you queued up multiple The concurrency was added relatively recently in https://github.com/kube-rs/kube/pull/1277/files Might be good to get a failing test case for this setup as a starting point. |
Alright, thanks. If I find the time I'll see if I can figure out why this is happening, since I'm able to reproduce. |
Commented on the PR. I arrived at the same solution when experimenting with this just now, and it does fix the sample I posted above. |
Current and expected behavior
I have a controller that uses
reconcile_on
for a kind of relationship where some resource (a pod) is referenced by my CRD. When the external resource is modified, I reconcile a subset of all instances of my resource.In my actual code I use
reconcile_on
, but the same happens when usingreconcile_all_on
. This demonstrates the problem:I have 3 instances of
MyCRD
with names "inst-1", "inst-2", "inst-3". I expect roughly the following log output when I start the controller, then modify a pod:Instead, what I get is
Consistently, one of the instances are skipped. If you set concurrency to 1 instead, then two are skipped. Removing concurrency makes it so that none are skipped.
Is this intentional? If so, what am I doing wrong? I can work around this by just implementing the concurrency with a semaphore in my reconcile method, but this feels like a bug to me.
Possible solution
No response
Additional context
No response
Environment
Server Version: v1.27.4
Running minikube
Configuration and features
Affected crates
kube-runtime
Would you like to work on fixing this bug?
None
The text was updated successfully, but these errors were encountered: