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

Make Api.get() use server side filtering #486

Open
jacobtomlinson opened this issue Sep 9, 2024 · 4 comments
Open

Make Api.get() use server side filtering #486

jacobtomlinson opened this issue Sep 9, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good description with clear steps for implementation. Great for newcomers help wanted Extra attention is needed kr8s

Comments

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Sep 9, 2024

Which project are you requesting an enhancement for?

kr8s

What do you need?

In #452 we made APIObject.get() more efficient by side server side filtering.

It would be nice if we could make the same improvement to Api.get(). For example:

import kr8s

pod1, pod2 = kr8s.get("Pod", "pod1", "pod2")

In the above example we list all pods, and then filter out just pod1 and pod2. It would be much more efficient to do the filtering on the server side. In #452 we used a field selector to do this, however it looks like it's not possible to do that for multiple resources as it doesn't support the in operator.

Looking at kubectl get pods pod1 pod2 it appears to make two get requests and does server side filtering on each one so that each request only returns one Pod. We probably want to replicate this pattern in kr8s.

@jacobtomlinson jacobtomlinson added enhancement New feature or request good first issue Good description with clear steps for implementation. Great for newcomers help wanted Extra attention is needed kr8s labels Sep 9, 2024
@TanyaKansal
Copy link

@jacobtomlinson can I work on this issue?

@jacobtomlinson
Copy link
Member Author

@TanyaKansal Sure!

@TanyaKansal
Copy link

@jacobtomlinson please assign to me. Also can you plz add hacktoberfest label to it?

@jacobtomlinson
Copy link
Member Author

Thanks for the enthusiasm! We don't assign issues here as it can block other folks from picking it up if you don't manage to get around to it. Please consider the issue yours. The whole repo has the hactoberfest label so we shouldn't need to label individual issues.

To anyone else reading this if more than two weeks have passed and no PR has been raised to close this then consider it available again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good description with clear steps for implementation. Great for newcomers help wanted Extra attention is needed kr8s
Projects
None yet
Development

No branches or pull requests

2 participants