Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pkg/oc/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@ func NewCommandCLI(name, fullName string, in io.Reader, out, errout io.Writer) *
)
}

// TODO: in 3.12 allow "-v" to support global verbosity like kubectl, not just "--v"
if flag := cmds.PersistentFlags().Lookup("v"); flag != nil {
flag.Shorthand = ""
}

return cmds
}

Expand Down
7 changes: 5 additions & 2 deletions pkg/oc/cli/set/deploymenthook.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ func NewCmdDeploymentHook(fullName string, f kcmdutil.Factory, streams genericcl
cmd.Flags().BoolVar(&o.Post, "post", o.Post, "Set or remove a post deployment hook")
cmd.Flags().StringArrayVarP(&o.Environment, "environment", "e", o.Environment, "Environment variable to use in the deployment hook pod")
// TODO: remove shorthand 'v' in 3.12
cmd.Flags().StringSliceVarP(&o.Volumes, "volumes", "v", o.Volumes, "Volumes from the pod template to use in the deployment hook pod")
cmd.Flags().MarkShorthandDeprecated("volumes", "Use --volumes instead.")
// this is done to trick pflag into allowing the duplicate registration. The local value here wins
cmd.Flags().StringSliceVarP(&o.Volumes, "v", "v", o.Volumes, "Volumes from the pod template to use in the deployment hook pod")
cmd.Flags().MarkDeprecated("v", "Use --volumes instead. Will be dropped in a future release")
cmd.Flags().MarkShorthandDeprecated("v", "Use --volumes instead.")
cmd.Flags().StringSliceVar(&o.Volumes, "volumes", o.Volumes, "Volumes from the pod template to use in the deployment hook pod")
cmd.Flags().StringVar(&o.FailurePolicyStr, "failure-policy", o.FailurePolicyStr, "The failure policy for the deployment hook. Valid values are: abort,retry,ignore")
cmd.Flags().BoolVar(&o.Local, "local", o.Local, "If true, set deployment hook will NOT contact api-server but run locally.")

Expand Down
6 changes: 5 additions & 1 deletion pkg/oc/cli/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ func NewCmdStatus(name, baseCLIName, fullName string, f kcmdutil.Factory, stream
}
cmd.Flags().StringVarP(&o.outputFormat, "output", "o", o.outputFormat, "Output format. One of: dot.")
// TODO: remove verbose in 3.12
cmd.Flags().BoolVarP(&o.suggest, "verbose", "v", o.suggest, "See details for resolving issues.")
// this is done to trick pflag into allowing the duplicate registration. The local value here wins
cmd.Flags().BoolVarP(&o.suggest, "v", "v", o.suggest, "See details for resolving issues.")
cmd.Flags().MarkDeprecated("v", "Use --suggest instead. Will be dropped in a future release")
cmd.Flags().MarkShorthandDeprecated("v", "Use --suggest instead. Will be dropped in a future release")
cmd.Flags().BoolVar(&o.suggest, "verbose", o.suggest, "See details for resolving issues.")
cmd.Flags().MarkDeprecated("verbose", "Use --suggest instead.")
cmd.Flags().MarkHidden("verbose")
cmd.Flags().BoolVar(&o.suggest, "suggest", o.suggest, "See details for resolving issues.")
Expand Down