mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +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:
@@ -105,7 +105,8 @@ func NewCmdCordon(f cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
options := &DrainOptions{Factory: f, Out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "cordon NODE",
|
||||
Use: "cordon NODE",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Mark node as unschedulable"),
|
||||
Long: cordon_long,
|
||||
Example: cordon_example,
|
||||
@@ -132,7 +133,8 @@ func NewCmdUncordon(f cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
options := &DrainOptions{Factory: f, Out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "uncordon NODE",
|
||||
Use: "uncordon NODE",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Mark node as schedulable"),
|
||||
Long: uncordon_long,
|
||||
Example: uncordon_example,
|
||||
@@ -184,7 +186,8 @@ func NewCmdDrain(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command {
|
||||
options := &DrainOptions{Factory: f, Out: out, ErrOut: errOut, backOff: clockwork.NewRealClock()}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "drain NODE",
|
||||
Use: "drain NODE",
|
||||
DisableFlagsInUseLine: true,
|
||||
Short: i18n.T("Drain node in preparation for maintenance"),
|
||||
Long: drain_long,
|
||||
Example: drain_example,
|
||||
|
||||
Reference in New Issue
Block a user