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

Field selectors for pods not implemented #135

Open
Woazboat opened this issue Apr 13, 2021 · 6 comments
Open

Field selectors for pods not implemented #135

Woazboat opened this issue Apr 13, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Woazboat
Copy link

Hi,
I was trying to set up a watch for events related to a single pod using field selectors, but couldn't find them in the pod client API. Are they not implemented or am I simply missing something?

@tintoy
Copy link
Owner

tintoy commented Apr 13, 2021

Hi.

Not currently implemented but pretty easy to add (just an additional parameter and its corresponding query parameter) by the look of it.

@tintoy tintoy self-assigned this Apr 13, 2021
@tintoy tintoy added the enhancement New feature or request label Apr 13, 2021
@tintoy
Copy link
Owner

tintoy commented Apr 13, 2021

Work's a bit crazy today but I'll see if I can get this added tonight or tomorrow morning :)

@Woazboat
Copy link
Author

Great, thank you :)

tintoy added a commit that referenced this issue Apr 18, 2021
@tintoy
Copy link
Owner

tintoy commented Apr 18, 2021

Ok, sorry for the delay; I've published new packages (version 2.3.14-develop0003) to the development feed (https://www.myget.org/F/dotnet-kube-client/api/v3/index.json) that now have label-selector support for the PodV1 client. If you have a couple of minutes, would you mind trying them out and let me know if the updated client does what you need it to?

If so I'll get the changes published on NuGet, too.

@Woazboat
Copy link
Author

Woazboat commented Apr 20, 2021

Thanks! I unfortunately haven't really gotten around to testing it aside from the one use case I had (listening for events for a specific pod), but it seems to be working fine and is just what I needed.

The added positional argument tripped me up a bit because suddenly some of my code was using the kubernetes namespace as a fields selector instead. (My fault for not using them as named arguments I guess, but still something to consider since it does change the API and I probably won't be the only one encountering that problem)

@tintoy
Copy link
Owner

tintoy commented Apr 20, 2021

Thanks for reminding me - I might add an overloading extension method instead 🙂

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

No branches or pull requests

2 participants