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
Instance of CR in the work queue are not unique #2703
Comments
The work queue deduplicates identical objects, you will at most have a given identifier in there |
I have only 1 worker and yet according toe the log at the same second (2024-03-13T13:42:32Z) the operator does the loop 3 times for the same instance of my resources 10 second later which is my re-queue time, it does the same, 3 reconciliation loops May be i'm missing but for me it means i have at least 3 instances of my object in the queue |
Maybe you don't put a string but the full object into the workqueue, which then won't be de-duplicated because its not identical? The mount of information you are giving here doesn't make it possible to help you, can you link to a code snippet that reproduces the behavior you are describing? |
/kind support |
my code only put instance in the queue in two ways:
|
The logs after i deleted two pods of watched deployment
|
You likely are just getting multiple events from the Deployment, as its status is updated to reflect the two deletions in order and then new pods created by the depoyment controller. Additionally, while the queue itself de-duplicates, the queue might hold the object that is currently being reconciled, resulting in it getting reconciled again right after. |
Hi,
I have a controller that reconcile resource of type
A
and it requeue instance of typeA
until the state on kubernetes match what i'm expectingNow this controller also watch deployments which trigger my reconciling loop
My issue is that i'm watching like 5 of them and they often all change at the same time which mean i will queue 5 items of the same instance each time something happens.
Each item will be requeue until state match what is expected, then it will still proceed all remaining items in the queue even tho reconciliation is done for that instance
It's not that much of an issue but it does flood the logs for nothing and it happens that we have a http notification when reconciliation is done and i don't want to do 10 time in 1 sec
What I would like is to only queue if there are no instance of this object in work queue already so that i have never more than 1 instance of a object in the work queue
I did some search but i did not find a way to do that.
Thank you for answer
The text was updated successfully, but these errors were encountered: