-
Notifications
You must be signed in to change notification settings - Fork 167
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
Ability to mutate single client to switch api group/version #346
Comments
Not currently. It's a known pain-point. Was discussed a lot in #208, #241 and several other places. Most previous discussion was towards allowing one client object to represent a "union" of methods from several api groups. |
I'll say right out that I don't like the mutation idea 😟 Now consider this code:
As it happens, this code only needed one group/version (say core v1), so it never bothers to declare "now I'm switching to core v1", it just assumes it got a suitable client. I think the implementation would not be significantly easier than a safer "union" client (you need to redo discovery on every switch, or better cache discovery results and methods from previous groups). I'll do a summary of other directions on #208. |
Thanks @cben I do prefer a "union" client or a client that can query the combination of all api groups. 👍 In the absence of such a client, I was hunting for a work-around in the mean-time. |
This would also be very not thread safe (#419). |
overview of alternatives: #208 (comment)
Currently in order to access api endpoints from another api group, we have instantiate a new
Client
objectclient = Kubeclient::Client.new('http://localhost:8080/apis/rbac.authorization.k8s.io', 'v1')
Is there a way to reset the
api_endpoint
of a pre-existingClient
? E.g.The text was updated successfully, but these errors were encountered: