Skip to content

Commit 25ca347

Browse files
authored
Merge pull request #7946 from govargo/change-tunnel-cleanup-default
Change tunnel cleanup flag default to true for auto tunnel cleanup
2 parents a551b30 + 138f73f commit 25ca347

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cmd/minikube/cmd/tunnel.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ var tunnelCmd = &cobra.Command{
5757
if err := manager.CleanupNotRunningTunnels(); err != nil {
5858
glog.Errorf("error cleaning up: %s", err)
5959
}
60-
return
6160
}
6261

6362
// Tunnel uses the k8s clientset to query the API server for services in the LoadBalancerEmulator.
@@ -104,5 +103,5 @@ var tunnelCmd = &cobra.Command{
104103
}
105104

106105
func init() {
107-
tunnelCmd.Flags().BoolVarP(&cleanup, "cleanup", "c", false, "call with cleanup=true to remove old tunnels")
106+
tunnelCmd.Flags().BoolVarP(&cleanup, "cleanup", "c", true, "call with cleanup=true to remove old tunnels")
108107
}

site/content/en/docs/commands/tunnel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ minikube tunnel [flags]
2121
### Options
2222

2323
```
24-
-c, --cleanup call with cleanup=true to remove old tunnels
24+
-c, --cleanup call with cleanup=true to remove old tunnels (default true)
2525
-h, --help help for tunnel
2626
```
2727

site/content/en/docs/handbook/accessing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ If the `minikube tunnel` shuts down in an abrupt manner, it may leave orphaned n
131131
minikube tunnel --cleanup
132132
````
133133

134+
NOTE: `--cleanup` flag's default value is `true`.
135+
134136
### Avoiding password prompts
135137

136138
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:

0 commit comments

Comments
 (0)