-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add predicates to Ansible operator for filtering Update, Delete, and Create events #1968
Comments
c/c @fabianvf |
I would really like to understand the reasoning for wanting these direct events. We have tried to hide this from the user as we don't believe that this information is necessary and causes more edge cases then you would expect. to see a more detailed response look here: kubernetes-sigs/controller-runtime#374 (comment) I would love to help figure out what/why we need this and how we can enable the functionality you're looking for without exposing the events. |
@rammohanc Are you talking about this predicate that is used to filter events of dependent resources? |
Reason behind the feature ask is we are seeing the occasional reconciles on CRs, that have not changed or its dependents have not been updated by the user (watchDependentResources and inject_owner_reference are turned on). When we are getting the update event for any of the dependent objects , that have not been updated by the user, reconcile is getting triggered. We want to avoid these reconcile or running playbook when we know there is no change to the dependent object similar to how Helm operator is handling these events. We made the changes and we don't see the above mentioned reconciles. Thanks
|
Hi @joelanford , Yes, we have used some of that logic (for update event) to address the reconciles that are not needed.
|
Event filtering will allow Ansible operator to skip reconciles that are not required Fixes operator-framework#1968
Event filtering will allow Ansible operator to skip reconciles that are not required Fixes operator-framework#1968
Event filtering will allow Ansible operator to skip reconciles that are not required Fixes operator-framework#1968
Event filtering will allow Ansible operator to skip reconciles that are not required Fixes operator-framework#1968
Event filtering will allow Ansible operator to skip reconciles that are not required Fixes operator-framework#1968
Feature Request
Is your feature request related to a problem? Please describe.
Without predicates for update events, controller is triggering reconcile for objects that have not changed, by user, causing unnecessary reconciles. Adding predicates to the Ansible operator, similar to how Helm operator is handling the update, create and delete events, will help optimize the Ansible operator. We have tried the above changes for update event and it helped reduce the amount of reconciles (or the number of times the playbook is run) significantly as we have many CRs (close to hundred)
Describe the solution you'd like
Predicates should be added before the events are passed to the controller.
The text was updated successfully, but these errors were encountered: