ManageIQ / ManageIQ/kubeclient
Ability to add api groups to 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
A variant of "union" client #208, #241:
Many people want one client object to combine methods from multiple API groups. The main questions are: union of *what* groups, *which version* per group, and who wins *method name collisions*?
This proposal is that Kubeclient would not try to guess. User would start from one group, and be able to add them one by one, each with specific version:
```
client = Kubeclient::Client.new('http://localhost:8080/', 'v1')
client.get_service_accounts
client.add_group('rbac.authorization.k8s.io/v1')
client.get_role_bindings
```
many people would add all desired groups when constructing client, and then just have the ability to call all methods:
```
client = Kubeclient::Client.new('http://localhost:8080/', 'v1')
client.add_group('rbac.authorization.k8s.io/v1')
client.get_service_accounts
client.get_role_bindings
```
Method name collisions would be decided by order of addition. Not sure if latest or earliest wins?
I think this can solve some concerns with #241.
It also can work better with CRDs that might appear dynamically, after client exists.
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 Kubeclient::Client.new and review the alternatives in issues #208 and #241, along with the linked issue comment. Clarify group-version selection and method-collision precedence before defining the behavior for add_group; done means a client can combine explicitly selected API groups, including groups added after construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, ruby
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100