godaddy / godaddy/kubernetes-client
Get pods via LabelSelctor
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 962
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
When trying to get pods via label selector I get all pods returned in the name space.
core.ns.po.get({ qs: { labelSelector: 'mylabel=thelabel' } }, (err, results) = > { console.log(results); });
Not sure what the correct method would be for getting pods based on label selectors. Looking through the code base, I noticed the .get on pods will not accept the label selector.
https://github.com/godaddy/kubernetes-client/blob/master/lib/replicationcontrollers.js#L46
Am I overlooking something simple?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the core.ns.po.get entry point and inspect the related request handling in lib/replicationcontrollers.js, especially the label-selector behavior mentioned in the issue. Confirm that passing labelSelector filters the returned pods rather than returning every pod in the namespace, and verify the result against the reported example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kubernetes, nodejs
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100