Skip to content
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

allow filtering watcher events when !observedGeneration changed #52

Closed
clux opened this issue Jul 20, 2019 · 2 comments · Fixed by #911
Closed

allow filtering watcher events when !observedGeneration changed #52

clux opened this issue Jul 20, 2019 · 2 comments · Fixed by #911
Assignees
Labels
runtime controller runtime related

Comments

@clux
Copy link
Member

clux commented Jul 20, 2019

rationale: we don't necessarily want to receive events when the .status object changes

@clux clux changed the title allow limiting informer events to when observed generation changed allow limiting informer events to when observedGeneration changed Jul 20, 2019
@clux clux removed the enhancement label Feb 27, 2020
@clux clux added runtime controller runtime related good first issue Good for newcomers help wanted Not immediately prioritised, please help! labels Mar 8, 2020
@clux
Copy link
Member Author

clux commented Mar 8, 2020

This would require maintaining a map of ObjectRef -> observedGeneration (int) inside a watcher / reflector and checking if it changed before bubbling up the event (first added event would always succeed)

Not quite what the best way to extend this, it's not very nice to have this in the internal watcher state by default, so need to have this optional somehow. It's a bit of a niche feature, and honestly, mostly for controllers to filter out its own modifications, so probably should think about this holistically in #279

@clux clux removed good first issue Good for newcomers help wanted Not immediately prioritised, please help! labels Aug 10, 2020
@clux clux moved this to Defining in Kube Roadmap Nov 3, 2021
@clux clux changed the title allow limiting informer events to when observedGeneration changed allow filtering watcher events when !observedGeneration changed Nov 3, 2021
clux added a commit to kube-rs/controller-rs that referenced this issue May 13, 2022
@clux clux self-assigned this May 13, 2022
@clux clux moved this from Defining to In Progress in Kube Roadmap May 13, 2022
@clux
Copy link
Member Author

clux commented May 13, 2022

PoC in kube-rs/controller-rs@7e2a152
using the impl trait magic that @teozkr brought for runtime conditions.
I think this is viable in terms of inclusion, but there's probably some cleanups. Feel free to drop some comments, otherwise I'll prepare a PR for that and await reviews then.

@clux clux linked a pull request May 13, 2022 that will close this issue
clux added a commit to kube-rs/controller-rs that referenced this issue May 23, 2022
* Use kube-rs/kube#910

Signed-off-by: clux <[email protected]>

* PoC Predicates for kube-rs/kube#52

Signed-off-by: clux <[email protected]>

* remove predicate stuff

Signed-off-by: clux <[email protected]>

* undo crd update

Signed-off-by: clux <[email protected]>

* build from branch

Signed-off-by: clux <[email protected]>

* kube bump

Signed-off-by: clux <[email protected]>

* bump

Signed-off-by: clux <[email protected]>
@clux clux closed this as completed in #911 Apr 3, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kube Roadmap Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime controller runtime related
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant