From 0dd625ffd3276d39d6682f1e5b53c27b3283b20a Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Wed, 25 Mar 2015 23:00:12 -0400 Subject: [PATCH] Order the commands in kubectl by importance and function Move the client config commands towards the bottom, keep the primary verbs near the top. Version goes at the bottom. --- docs/kubectl-port-forward.md | 4 ++-- docs/kubectl.md | 10 +++++----- docs/man/man1/kubectl-port-forward.1 | 4 ++-- docs/man/man1/kubectl.1 | 2 +- pkg/kubectl/cmd/cmd.go | 12 ++++++------ pkg/kubectl/cmd/portforward.go | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/kubectl-port-forward.md b/docs/kubectl-port-forward.md index b7c44b12f91..425e6ec0451 100644 --- a/docs/kubectl-port-forward.md +++ b/docs/kubectl-port-forward.md @@ -1,11 +1,11 @@ ## kubectl port-forward -Forward 1 or more local ports to a pod. +Forward one or more local ports to a pod. ### Synopsis -Forward 1 or more local ports to a pod. +Forward one or more local ports to a pod. ``` kubectl port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] diff --git a/docs/kubectl.md b/docs/kubectl.md index a637b50848a..63988af4852 100644 --- a/docs/kubectl.md +++ b/docs/kubectl.md @@ -45,24 +45,24 @@ kubectl ``` ### SEE ALSO -* [kubectl-version](kubectl-version.md) -* [kubectl-apiversions](kubectl-apiversions.md) -* [kubectl-clusterinfo](kubectl-clusterinfo.md) -* [kubectl-proxy](kubectl-proxy.md) * [kubectl-get](kubectl-get.md) * [kubectl-describe](kubectl-describe.md) * [kubectl-create](kubectl-create.md) * [kubectl-update](kubectl-update.md) * [kubectl-delete](kubectl-delete.md) -* [kubectl-config](kubectl-config.md) * [kubectl-namespace](kubectl-namespace.md) * [kubectl-log](kubectl-log.md) * [kubectl-rollingupdate](kubectl-rollingupdate.md) * [kubectl-resize](kubectl-resize.md) * [kubectl-exec](kubectl-exec.md) * [kubectl-port-forward](kubectl-port-forward.md) +* [kubectl-proxy](kubectl-proxy.md) * [kubectl-run-container](kubectl-run-container.md) * [kubectl-stop](kubectl-stop.md) * [kubectl-expose](kubectl-expose.md) * [kubectl-label](kubectl-label.md) +* [kubectl-config](kubectl-config.md) +* [kubectl-clusterinfo](kubectl-clusterinfo.md) +* [kubectl-apiversions](kubectl-apiversions.md) +* [kubectl-version](kubectl-version.md) diff --git a/docs/man/man1/kubectl-port-forward.1 b/docs/man/man1/kubectl-port-forward.1 index 48d8fa16b83..0f99fb29f64 100644 --- a/docs/man/man1/kubectl-port-forward.1 +++ b/docs/man/man1/kubectl-port-forward.1 @@ -3,7 +3,7 @@ .SH NAME .PP -kubectl port\-forward \- Forward 1 or more local ports to a pod. +kubectl port\-forward \- Forward one or more local ports to a pod. .SH SYNOPSIS @@ -13,7 +13,7 @@ kubectl port\-forward \- Forward 1 or more local ports to a pod. .SH DESCRIPTION .PP -Forward 1 or more local ports to a pod. +Forward one or more local ports to a pod. .SH OPTIONS diff --git a/docs/man/man1/kubectl.1 b/docs/man/man1/kubectl.1 index 95900739623..ed53e61bf1b 100644 --- a/docs/man/man1/kubectl.1 +++ b/docs/man/man1/kubectl.1 @@ -128,7 +128,7 @@ Find more information at .SH SEE ALSO .PP -\fBkubectl\-version(1)\fP, \fBkubectl\-apiversions(1)\fP, \fBkubectl\-clusterinfo(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-log(1)\fP, \fBkubectl\-rollingupdate(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, +\fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-log(1)\fP, \fBkubectl\-rollingupdate(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-clusterinfo(1)\fP, \fBkubectl\-apiversions(1)\fP, \fBkubectl\-version(1)\fP, .SH HISTORY diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 3ac3cd6059c..37df9313bfa 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -200,18 +200,12 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, f.BindFlags(cmds.PersistentFlags()) - cmds.AddCommand(f.NewCmdVersion(out)) - cmds.AddCommand(f.NewCmdApiVersions(out)) - cmds.AddCommand(f.NewCmdClusterInfo(out)) - cmds.AddCommand(f.NewCmdProxy(out)) - cmds.AddCommand(f.NewCmdGet(out)) cmds.AddCommand(f.NewCmdDescribe(out)) cmds.AddCommand(f.NewCmdCreate(out)) cmds.AddCommand(f.NewCmdUpdate(out)) cmds.AddCommand(f.NewCmdDelete(out)) - cmds.AddCommand(cmdconfig.NewCmdConfig(out)) cmds.AddCommand(NewCmdNamespace(out)) cmds.AddCommand(f.NewCmdLog(out)) cmds.AddCommand(f.NewCmdRollingUpdate(out)) @@ -219,6 +213,7 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, cmds.AddCommand(f.NewCmdExec(in, out, err)) cmds.AddCommand(f.NewCmdPortForward()) + cmds.AddCommand(f.NewCmdProxy(out)) cmds.AddCommand(f.NewCmdRunContainer(out)) cmds.AddCommand(f.NewCmdStop(out)) @@ -226,6 +221,11 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`, cmds.AddCommand(f.NewCmdLabel(out)) + cmds.AddCommand(cmdconfig.NewCmdConfig(out)) + cmds.AddCommand(f.NewCmdClusterInfo(out)) + cmds.AddCommand(f.NewCmdApiVersions(out)) + cmds.AddCommand(f.NewCmdVersion(out)) + return cmds } diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index a9adf0b0b24..d3bcc248754 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -45,8 +45,8 @@ $ kubectl port-forward -p mypod 0:5000` func (f *Factory) NewCmdPortForward() *cobra.Command { cmd := &cobra.Command{ Use: "port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]", - Short: "Forward 1 or more local ports to a pod.", - Long: "Forward 1 or more local ports to a pod.", + Short: "Forward one or more local ports to a pod.", + Long: "Forward one or more local ports to a pod.", Example: portforward_example, Run: func(cmd *cobra.Command, args []string) { err := RunPortForward(f, cmd, args)