-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Use TYPE instead of RESOURCE in help string #10742
Conversation
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
LGTM |
ok to test |
GCE e2e build/test passed for commit eb31fb891362215432d1eb31eae3213c9e291d3d. |
I don't get this change. You call "kubectl get pods foo" The RESOURCE is "pods". The returned KIND is "Pod". When you create a @deads2k @smarterclayton let me know if i am missing something here, On Thursday, July 9, 2015, Kubernetes Bot notifications@github.com wrote:
|
Something like 'kubectl get pods/foo' looks stranges, use plural to request and get one member, it's not natural. I think the reason ctl accept plurals is for user's ease, not to restrict them. Accept that we have obvious distinction between resources and kind internally. But for MM interface, would a way following natural language be better? |
If your change did what you suggested I would be less inclined to argue, but it just changes help text by making the help text incorrect with the current structure of kubectl which is a relatively thin wrapper over the Rest API at this time. We could argue that it should take KIND but the fact remains that it actually aligns with RESOURCE for v1. |
@derekwaynecarr
|
To be even more precise, we're talking about the resource collection name You can feed a kind to the generic commands, but you can also give it a One benefit of KIND is that it's much shorter... There may be an argument On Jul 9, 2015, at 10:42 PM, Eric Tune notifications@github.com wrote: @derekwaynecarr https://github.com/derekwaynecarr Okay, I understand why you don't want to call this KIND. And I don't mind
— |
Singular values are accepted ( |
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
1 similar comment
Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist") If this message is too spammy, please complain to ixdy. |
please rebase |
Do we have a consensus that this a good or at least reasonable change to make? If so, please rebase and look carefully for all occurrences:
We should also document the resource/name syntax more consistently. |
I'm ok with KIND (I reserve the right to regret my decision later) On Mon, Jul 27, 2015 at 1:51 AM, Brian Grant notifications@github.com
Clayton Coleman | Lead Engineer, OpenShift |
Can it be called something other than KIND or RESOURCE? It seems clear to me that it is neither. |
Type or object: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/devel/api-conventions.md#types-kinds Or we could introduce "collection". But I honestly wouldn't be too pedantic for a CLI where most users won't read and internalize the API specification. |
Any objections to |
I rebased the change with KIND. If there're other ideas, I'm happy to modify it again. |
+1 |
Fine with |
RESOURCE_TYPE is clear, but kind of wide. |
In the CLI context TYPE or KIND seem ok - RESOURCE_TYPE is too long and On Wed, Jul 29, 2015 at 4:01 PM, Brian Grant notifications@github.com
Clayton Coleman | Lead Engineer, OpenShift |
Since most people are positive with |
@@ -32,7 +32,7 @@ import ( | |||
const ( | |||
get_long = `Display one or many resources. | |||
|
|||
Possible resources include (case insensitive): pods (po), services (svc), | |||
Possible resource kinds include (case insensitive): pods (po), services (svc), |
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.
s/resource kinds/types/
One change and then regen docs and then it will look good to me. |
213af55
to
33fb617
Compare
For commands in kubectl, use TYPE in help string.
lgtm, thanks for the fix. |
Use TYPE instead of RESOURCE in help string
Fixes: #10630
For get and describe command in kubectl, use KIND in help string.