From 24aefaebb6e5606b65ad75365d88573a782f674a Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Tue, 26 Jan 2021 13:05:30 -0800 Subject: [PATCH 1/2] Unhide --schedule flag for scheduled stop --- cmd/minikube/cmd/stop.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index bc2e2d6b51f4..b1621bf5e0bd 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -61,10 +61,6 @@ func init() { stopCmd.Flags().BoolVar(&keepActive, "keep-context-active", false, "keep the kube-context active after cluster is stopped. Defaults to false.") stopCmd.Flags().DurationVar(&scheduledStopDuration, "schedule", 0*time.Second, "Set flag to stop cluster after a set amount of time (e.g. --schedule=5m)") stopCmd.Flags().BoolVar(&cancelScheduledStop, "cancel-scheduled", false, "cancel any existing scheduled stop requests") - - if err := stopCmd.Flags().MarkHidden("schedule"); err != nil { - klog.Info("unable to mark --schedule flag as hidden") - } stopCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Format to print stdout in. Options include: [text,json]") if err := viper.GetViper().BindPFlags(stopCmd.Flags()); err != nil { From 78a89a13fd16686000eb66e9600bb81c54f1c314 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Tue, 26 Jan 2021 13:07:00 -0800 Subject: [PATCH 2/2] Update docs --- site/content/en/docs/commands/stop.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/content/en/docs/commands/stop.md b/site/content/en/docs/commands/stop.md index 34db14a875f4..ea09dd77945a 100644 --- a/site/content/en/docs/commands/stop.md +++ b/site/content/en/docs/commands/stop.md @@ -24,6 +24,7 @@ minikube stop [flags] --cancel-scheduled cancel any existing scheduled stop requests --keep-context-active keep the kube-context active after cluster is stopped. Defaults to false. -o, --output string Format to print stdout in. Options include: [text,json] (default "text") + --schedule duration Set flag to stop cluster after a set amount of time (e.g. --schedule=5m) ``` ### Options inherited from parent commands