From 138f73f9f8e694a628ccfaede71f68d39ec07f61 Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Thu, 30 Apr 2020 19:26:46 +0900 Subject: [PATCH] Change tunnel cleanup flag default to true --- cmd/minikube/cmd/tunnel.go | 3 +-- site/content/en/docs/commands/tunnel.md | 2 +- site/content/en/docs/handbook/accessing.md | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/tunnel.go b/cmd/minikube/cmd/tunnel.go index 6474e8fbf782..2f7fb45a9e9b 100644 --- a/cmd/minikube/cmd/tunnel.go +++ b/cmd/minikube/cmd/tunnel.go @@ -57,7 +57,6 @@ var tunnelCmd = &cobra.Command{ if err := manager.CleanupNotRunningTunnels(); err != nil { glog.Errorf("error cleaning up: %s", err) } - return } // Tunnel uses the k8s clientset to query the API server for services in the LoadBalancerEmulator. @@ -104,5 +103,5 @@ var tunnelCmd = &cobra.Command{ } func init() { - tunnelCmd.Flags().BoolVarP(&cleanup, "cleanup", "c", false, "call with cleanup=true to remove old tunnels") + tunnelCmd.Flags().BoolVarP(&cleanup, "cleanup", "c", true, "call with cleanup=true to remove old tunnels") } diff --git a/site/content/en/docs/commands/tunnel.md b/site/content/en/docs/commands/tunnel.md index 72b73a316bf4..7fde8449d395 100644 --- a/site/content/en/docs/commands/tunnel.md +++ b/site/content/en/docs/commands/tunnel.md @@ -21,7 +21,7 @@ minikube tunnel [flags] ### Options ``` - -c, --cleanup call with cleanup=true to remove old tunnels + -c, --cleanup call with cleanup=true to remove old tunnels (default true) -h, --help help for tunnel ``` diff --git a/site/content/en/docs/handbook/accessing.md b/site/content/en/docs/handbook/accessing.md index 9b0aedae17b1..eabbd0b56ec6 100644 --- a/site/content/en/docs/handbook/accessing.md +++ b/site/content/en/docs/handbook/accessing.md @@ -131,6 +131,8 @@ If the `minikube tunnel` shuts down in an abrupt manner, it may leave orphaned n minikube tunnel --cleanup ```` +NOTE: `--cleanup` flag's default value is `true`. + ### Avoiding password prompts Adding a route requires root privileges for the user, and thus there are differences in how to run `minikube tunnel` depending on the OS. If you want to avoid entering the root password, consider setting NOPASSWD for "ip" and "route" commands: