k3s/cmd
Kubernetes Submit Queue c19569f03f Merge pull request #34502 from fabianofranz/cli_usability_improvements
Automatic merge from submit-queue

Improvements to CLI usability and maintainability

Improves `kubectl` from an usability perspective by

1. Fixing how we handle terminal width in help. Some sections like the flags use the entire available width, while others like long descriptions breaks lines but don't follow a well established max width (screenshot below). This PR adds a new responsive writer that will adjust to terminal width and set 80, 100, or 120 columns as the max width, but not more than that given POSIX best practices and recommendations for better readability.
![terminal_width](https://cloud.githubusercontent.com/assets/158611/19253184/b23a983e-8f1f-11e6-9bae-667dd5981485.png)
2. Adds our own normalizers for long descriptions and cmd examples which allows us better control about how things like lists, paragraphs, line breaks, etc are printed. Features markdown support. Looks like `templates.LongDesc` and `templates.Examples` instead of `dedent.Dedend`.
3. Allows simple reordering and reuse of help and usage sections.
3. Adds `verify-cli-conventions.sh` which intends to run tests to make sure cmd developers are using what we propose as [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md). Just a couple simple tests for now but the framework is there and it's easy to extend.
4. Update [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md) to use our own normalizers instead of `dedent.Dedent`.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Improves how 'kubectl' uses the terminal size when printing help and usage.
```

@kubernetes/kubectl
2016-10-17 23:41:23 -07:00
..
clicheck Tools for checking CLI conventions 2016-10-17 11:50:02 -02:00
gendocs
genkubedocs
genman Add support for generating all the manpages to genman 2016-09-22 20:09:22 +05:30
genswaggertypedocs
genutils
genyaml
hyperkube Remove old references to contrib/mesos 2016-10-01 16:46:48 +03:00
kube-apiserver add ownerref permission checks 2016-10-17 09:38:05 -04:00
kube-controller-manager convert deployment controller to shared informers 2016-10-07 15:06:57 -04:00
kube-discovery Expand on kube-discovery API and integrate container build. 2016-09-16 11:37:04 -03:00
kube-dns kube-dns: Add --dns-bind-address flag 2016-09-23 09:57:57 -07:00
kube-proxy Add a lower-bound for conntrack 2016-09-26 20:25:40 -07:00
kubeadm Ensure `MasterConfiguration` is refered to as `cfg` throughout 2016-10-17 12:08:11 +01:00
kubectl Split the version metric out to its own package 2016-08-24 11:47:16 -07:00
kubelet Merge string flag into util flag 2016-10-11 23:28:59 -04:00
kubemark remove almost all usages of clientadapter 2016-09-26 07:53:03 -04:00
kubernetes-discovery
libs/go2idl Support optional tag in OpenAPI generator 2016-10-17 08:52:13 -07:00
linkcheck
mungedocs Update the latestReleaseBranch to release-1.4 in the munger. 2016-09-01 14:40:55 -07:00
OWNERS