Skip to content

Commit

Permalink
Merge pull request #7946 from govargo/change-tunnel-cleanup-default
Browse files Browse the repository at this point in the history
Change tunnel cleanup flag default to true for auto tunnel cleanup
  • Loading branch information
medyagh authored Apr 30, 2020
2 parents a551b30 + 138f73f commit 25ca347
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/minikube/cmd/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion site/content/en/docs/commands/tunnel.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 2 additions & 0 deletions site/content/en/docs/handbook/accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 25ca347

Please sign in to comment.