-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Parametrize resource path with version part of apiVersion #265
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for patch, Can you point me to a link where order is specified <name,namespace>.
OpenAPI spec has unrelated changes. I suggest you run update client script once to pull any changes upstream, then commit these changes, then add manual changes in a separate commit and then the third commit updating client again to apply effects on manual changes to the generated client. so total 3 commits: commit1 - update generated client with no change (fetch upstream changes) I've added an issue to document these best practices: #266 |
@codevulture , Sure, here's an example: https://raw.githubusercontent.com/kubernetes-incubator/client-python/master/kubernetes/client/apis/core_v1_api.py (search for patch_namespaced_pod e.g.). Pardon the raw link, GitHub won't show the usual one right now. I realize that the ordering for declaring TPR resources is not <name, namespace>, but rather <namespace, name>, but for many of the standard APIs (Core V1, Extensions, Batch etc.) it seems to be the case that the ordering is <name, namespace>. And the Go APIs are a bit different as well. I don't feel strongly about it all, so if you wish, I can revert that part. |
@mbohlool , Thanks. I tried to do what you suggested. @codevulture , this second reincarnation is without swapping the name and namespace parameter ordering. If it is desired, I can put it back in, just let me know. |
@ebbeelsborg thanks. Almost there (commit-wise). Can you now use |
@ebbeelsborg : Thanks for your work, though it is a matter of choice. i wanted to understand the reason of change which you explained well. |
Add parameter 'name' to update operation
@mbohlool , @codevulture , let me know if I need to do something more/different. |
Thanks @ebbeelsborg, it looks good. So to be clear, a |
@mbohlool , Correct. A Regarding the order of parameters (I haven't tested it, but I suspect that the |
Sure, will merge this one. Thanks. |
Fixes #256 .
Also swaps the order of parameters "name" and "namespace" where relevant to match the standard API.
Note: This change will, intentionally, break consumers of the API that were relying on the version to always be "v1" without specifying it. Such consumers will now have to specify "v1" explicitly.