Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tunnel cleanup flag default to true for auto tunnel cleanup #7946

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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