Added bash completion for several kubectl commands.

This path added/fixed bash completion for several
kubectl commands.

Fixes #25287
This commit is contained in:
Xing Zhou
2016-08-22 10:46:50 +08:00
parent 956501b1f0
commit 80d6cd0a40
9 changed files with 60 additions and 15 deletions

View File

@@ -47,6 +47,9 @@ var (
func NewCmdRolloutStatus(f *cmdutil.Factory, out io.Writer) *cobra.Command {
options := &StatusOptions{}
validArgs := []string{"deployment"}
argAliases := kubectl.ResourceAliases(validArgs)
cmd := &cobra.Command{
Use: "status (TYPE NAME | TYPE/NAME) [flags]",
Short: "Watch rollout status until it's done",
@@ -55,6 +58,8 @@ func NewCmdRolloutStatus(f *cmdutil.Factory, out io.Writer) *cobra.Command {
Run: func(cmd *cobra.Command, args []string) {
cmdutil.CheckErr(RunStatus(f, cmd, out, args, options))
},
ValidArgs: validArgs,
ArgAliases: argAliases,
}
usage := "Filename, directory, or URL to a file identifying the resource to get from a server."