ManageIQ / ManageIQ/kubeclient
Ability to obtain related client for different api group/version from existing client
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 426
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
overview of alternatives: https://github.com/abonas/kubeclient/issues/208#issuecomment-412706681
(Originally mentioned in https://github.com/abonas/kubeclient/issues/329#issuecomment-400664345)
A way to reduce multi-api-group pain (#208) that would be easy to implement, not sure if best long-term:
Add a method on a client that returns a "related" client, same cluster same settings just different api group. Something like:
client = Kubeclient::Client.new('http://localhost:8080/', 'v1')
client.get_service_accounts
client.for_group('rbac.authorization.k8s.io/v1').get_role_bindings
This way the group/version of the client you originally got doesn't matter, you can derive one that you need.
Ideally the overhead would be low. Memory for settings can be shared. Discovery can be cached, e.g. all related clients can share a {group => client} hash and only construct new one if not yet known.
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 at Kubeclient::Client.new and trace how the client's group/version and shared settings are stored. Review the existing get_service_accounts and get_role_bindings entry points, then determine how a for_group('rbac.authorization.k8s.io/v1') client should preserve cluster settings and avoid unnecessary discovery work. Done means related clients can serve another API group/version without changing the original client.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100