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

Setup server-side filter of the pods #369

Open
Tracked by #362
ahg-g opened this issue Feb 19, 2025 · 3 comments
Open
Tracked by #362

Setup server-side filter of the pods #369

ahg-g opened this issue Feb 19, 2025 · 3 comments

Comments

@ahg-g
Copy link
Contributor

ahg-g commented Feb 19, 2025

What would you like to be added:

Currently the pod controller filters the pods at the epp side, the filter is primarily the pool selector and ready status. At scale this could be expensive. To address this, we should setup the watch to perform server side filter.

In controller-runtime, we can do this using the ByObject cache option: https://github.com/kubernetes-sigs/controller-runtime/blob/6f611112490242f9e8d5b0ccdc0f3bb8c86c85ef/pkg/cache/cache.go#L240

The tricky part is that the filter depends on the pool, which may change during runtime, and so we need to think of a way to update the filter on the pod informer/cache.

Why is this needed:
To improve the scalability of the epp.

@ahg-g ahg-g changed the title Find a way to setup server side filter of the pods Setup server side filter of the pods Feb 19, 2025
@ahg-g ahg-g changed the title Setup server side filter of the pods Setup server-side filter of the pods Feb 21, 2025
@hzxuzhonghu
Copy link
Member

This is easy to use native informer. But the controller-runtime seems only allow static filter, it may need to implement a wrapper interface

@ahg-g
Copy link
Contributor Author

ahg-g commented Feb 23, 2025

Does informer allow updating the server-side selector after it was started? My understanding is that it requires a recreate also.

@hzxuzhonghu
Copy link
Member

Does informer allow updating the server-side selector after it was started?

No, but we can update filter on client-side easily. Istio pkg/kube/kclient/client.go has already implemented client-side filter

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

No branches or pull requests

3 participants