-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Multiple controllers handling same descendant kind #169
Comments
Oooh right. Nice catch. I was confused at first as I am using the term "descendant" for the descending object, i.e. the ones created by a controller. If I get you correctly, you have multiple handlers/controllers for the same query. I think it is clear. |
Ooh no now I think I understand. You ARE talking about descendants. So... what stops you from implementing a dispatching controller? This way you wont need to watch the same query multiple times. |
I am indeed talking about objects created by controllers 🙂 |
Yeah so with Bonny 1.0 controllers are just Pluggable steps. Which makes the whole thing... well... pluggable. I am thinking about adding something like a Instead of using ownerReferences (which technically is a list anyway) I am thinking about adding a label to descendants like |
@adriffaud On master I have added the I'm not proceeding with |
@adriffaud can we close this? |
Yes sorry! Thanks for the additions! |
Environment
Current behavior
I have an operator with 3 different controllers handling other operators custom resources, config maps, deployments, service accounts, etc.
While trying to migrate to 1.0.0-rc.1 I encounter an issue with the descendants handling.
It seems to me that with the current implementation it is not possible to have multiple controllers called for a same descendant kind as we can only pass one controller along a query, and if we add two similar queries for different controllers, we get this error:
Expected behavior
I would expect to be able to have multiple controllers called on an event descendants of the same kind.
In my operator implementation, if the event resource is not one of the CRDs of the operator, I rely on the resource
ownerReference
to know which controller to call based on the kind. This allows to only have one watcher per kind while dispatching events to the right controllers.The text was updated successfully, but these errors were encountered: