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

Add "RemoveEventHandler" from informers #6501

Open
csviri opened this issue Oct 25, 2024 · 3 comments
Open

Add "RemoveEventHandler" from informers #6501

csviri opened this issue Oct 25, 2024 · 3 comments
Assignees

Comments

@csviri
Copy link
Contributor

csviri commented Oct 25, 2024

Is your enhancement related to a problem? Please describe

Would like to dynamically remove event handlers from informers.
Similarly, how it is implemented in go:
https://github.com/kubernetes/client-go/blob/3dc7fd5f4c1d8afaf5924c461eae2ab27db0045a/tools/cache/shared_informer.go#L166

Describe the solution you'd like

Similarly as in go, would like to change the return type of the function:

https://github.com/fabric8io/kubernetes-client/blob/refs/heads/main/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/DefaultSharedIndexInformer.java#L100

to a new type ResourceEventHandlerRegistration. That could be subsequently used to remove the event handler.

Describe alternatives you've considered

No response

Additional context

No response

@csviri
Copy link
Contributor Author

csviri commented Oct 25, 2024

@shawkins @manusa if this makes sense to you, I can take a look and implement it.

@shawkins
Copy link
Contributor

if this makes sense to you, I can take a look and implement it.

Removing handlers seems absolutely fine.

@manusa
Copy link
Member

manusa commented Oct 28, 2024

OK from my side too.
You're the ones mostly dealing with informers.
Please go ahead 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants