-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
overview of alternatives: #208 (comment)
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.
kuahyeow and mayra-cabrera