Merge pull request #5978 from smarterclayton/order_commands

Order the commands in kubectl by importance and function
This commit is contained in:
Clayton Coleman
2015-03-26 14:22:04 -04:00
6 changed files with 18 additions and 18 deletions

View File

@@ -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
}

View File

@@ -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)