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

@@ -61,6 +61,9 @@ var (
func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command {
opts := &PauseConfig{}
validArgs := []string{"deployment"}
argAliases := kubectl.ResourceAliases(validArgs)
cmd := &cobra.Command{
Use: "pause RESOURCE",
Short: "Mark the provided resource as paused",
@@ -78,6 +81,8 @@ func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command {
}
cmdutil.CheckErr(utilerrors.Flatten(utilerrors.NewAggregate(allErrs)))
},
ValidArgs: validArgs,
ArgAliases: argAliases,
}
usage := "Filename, directory, or URL to a file identifying the resource to get from a server."