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

tunnel: Allow one tunnel per profile #16839

Merged
merged 1 commit into from
Jul 10, 2023
Merged
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
6 changes: 3 additions & 3 deletions cmd/minikube/cmd/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var tunnelCmd = &cobra.Command{
}
}

mustLockOrExit()
mustLockOrExit(cname)
defer cleanupLock()

// Tunnel uses the k8s clientset to query the API server for services in the LoadBalancerEmulator.
Expand Down Expand Up @@ -131,8 +131,8 @@ func cleanupLock() {
}
}

func mustLockOrExit() {
tunnelLockPath := filepath.Join(localpath.MiniPath(), ".tunnel_lock")
func mustLockOrExit(profile string) {
tunnelLockPath := filepath.Join(localpath.Profile(profile), ".tunnel_lock")

lockHandle = fslock.New(tunnelLockPath)
err := lockHandle.TryLock()
Expand Down