-
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
Expose {create,delete,...}_entity methods to manipulate objects of dynamic kind #332
Comments
Feedback from @stiller-leser, not sure why it disappeared:
|
#241 (comment) points out that among many other things #241 tried to, in offered better names and possibly better interface:
where the passed data was expected to contain However, if you must provide both EDIT: What about get, list, watch?
|
@abonas you've previously objected to #241 adding "more than one way of doing the same thing". Would love to hear your thoughts as I'm pushing for a variant of same :-) TLDR Kubeclient sorely lacks a way to manipulate dynamic resource types — Plus I'm hoping it can work without any discovery, from single client for any apiVersion, with rest of discovery -> define_method becoming a convenience layer on top of this. |
For patch, we need a way to choose patch format (#357) — json patch / json merge patch / strategic merge patch (https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/). |
@cben It looks like you arrived at a decision on this for a method where specifying both |
Right, that decision is clear. See checkboxes above, there are some questions that I hoped people would have an opinion on, but I've been linking people to this issue for some time and nobody said anything so I guess the design is OK 🤷♂️ A major thing I hope we can achieve here is having a single client object work with any apiVersion, kind given. Can we deduce the request URL from the
Another small step that's possible is first make this work for currently discovered api group only. |
If you have objects whose
kind
you don't know ahead of time, you can't used discovery-created methods likecreate_service
,get_services
.Computing the method name e.g.
client.send("get_#{kind}", ...)
is messy, especially if you need the plural name :-(We already have generic methods:
get_entity
,get_entities
,create_entity
,update_entity
,patch_entity
,delete_entity
,watch_entities
— except they're not documented in README and not considered public (and I believe we already changed interface once based on this)Main use case is using objects from a yaml file (or from template processing). Related #208, #187, #325, #329. (I felt before those would be good to expose, now found convincing use case)
watch_entities
does double singular/plural duty depending of if:name
is given — is this elegant?So does
watch_pods
BTW — there is nowatch_pod
.The text was updated successfully, but these errors were encountered: