kubectl: Improve inconsistent help messages of some specific commands
What would you like to be added:
follow-up #117930
I opened a PR #117930 to optimize help messages’ usage line behavior.
In the process I also optimized kubectl create secret --help description from
Create a secret using specified subcommand.
to
Create a secret with specified type.
A docker-registry type secret is for accessing a container registry.
A generic type secret indicate an Opaque secret type.
A tls type secret holds TLS certificate and its associated key.
After @brianpursley 's careful review and a little discuss, I found the following issues:
kubectl create service --helpmay also be too simple, and I think it should be enriched a little.- Except
kubectl create secretthat I’ve optimized, there are alsocreate servicepluginrolloutsettopwhose usage line showing “kubectl xxx [flags] [options]”. IMOP they should be likekubectl xxx (subcommand1 | subcommand2 | subcommand3) [options]in an enum style or at leastkubectl xxx <command> [options]. rolloutandsetbehaves differently than other commands: “kubectl xxx SUBCOMMAND [options]”, I think it should be consistent with others.
Significant changes like “command description” or “help message consistent style” may better be decided on by SIG. So I’m following @brianpursley 's suggestion to open this issue to discuss about this.
Why is this needed:
Clean up messy and inconsistencies is never a bad thing 😃.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 19 (12 by maintainers)
Hi @brianpursley , Thanks for clarifying the stand on this. There are some help messages that will still need some change. For eg .
kubectl plugincommand doesn’t have example, `kubectl get --helpstates the following even though we can use--namespaceto get details for other namespace resources.kubectl replace -f FILENAMEshould be more elaborate as we can also add customize directory so rightfully ::kubectl replace ([-f FILENAME] | [-k DIRECTORY])kubectl diff --helpcan have more examplesI apologize for may not be able to focus on this recently. Once I’m free I’d love to work with you @Ritikaa96. Unless you’re so efficient I can’t catch up. 😆
Update on the same,Two related issues are : #1452 #1457
Oh yes. Did we discuss this at the last biweekly meeting? This would be a good topic for that meeting.
Sure thing. I would say making it an Umbrella issue would be better as there are lots of commands help messages that needs to change in this way.
I’d agree , I’m waiting for sig experts to share there thought. we should not start working on this until the triage is accepted and until there is a discussion done on same topic.