kubeclient icon indicating copy to clipboard operation
kubeclient copied to clipboard

Access sub-resources

Open cben opened this issue 6 years ago • 2 comments

Kubernetes APIs include many sub-resources. Currently Kubeclient ignores all of those in discovery and surprisingly we haven't seen much complaints.

This is a pre-emptive issue to collect whether there are any use cases for generic discovery support?

The actual API of sub-resources varies widely, and you can't know this from the discovery info :gift:

Conclusion?

So far, it sounds like generic discovery is pretty pointless, as one needs special-purpose code for each use case anyway? If anyone has counter-examples, please post here! That's my goal in opening this issue!

P.S. Method naming problem

One of the reason Kubeclient ignores sub-resource is it translates resources like pods to method names like get_pods, delete_pod etc. If we stop ignoring them, it's not obvious how to name methods.

cben avatar Jul 09 '19 08:07 cben

cc @shiramax. I believe your kubevirt VNC use case won't be helped by any generic sub-resource functionality, which this issue is about; but #417 (params to do your own connection) is more relevant for you.

cben avatar Jul 09 '19 09:07 cben

#422 wants to patch foo/status, and I think we should instead allow all verbs on foo/status.

cben avatar Dec 16 '19 10:12 cben