mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #53631 from dixudx/enforce_cobra_required_flags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. update vendor spf13/cobra to enforce required flags **What this PR does / why we need it**: spf13/cobra#502 has enforced checking flags that marked as required, an error will be raised if unset. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:fixes #54855 xref #48400 fixes kubernetes/kubectl#121 **Special notes for your reviewer**: /assign @liggitt @eparis **Release note**: ```release-note kubectl now enforces required flags at a more fundamental level ```
This commit is contained in:
@@ -96,7 +96,8 @@ type RunObject struct {
|
||||
|
||||
func NewCmdRun(f cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "run NAME --image=image [--env=\"key=value\"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]",
|
||||
Use: "run NAME --image=image [--env=\"key=value\"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Run a particular image on the cluster"),
|
||||
Long: runLong,
|
||||
Example: runExample,
|
||||
|
||||
Reference in New Issue
Block a user