Skip to content

Commit 69b009f

Browse files
authored
Merge pull request #16839 from spowelljr/oneTunnelPerProfile
tunnel: Allow one tunnel per profile
2 parents d899552 + 763215d commit 69b009f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: cmd/minikube/cmd/tunnel.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var tunnelCmd = &cobra.Command{
7676
}
7777
}
7878

79-
mustLockOrExit()
79+
mustLockOrExit(cname)
8080
defer cleanupLock()
8181

8282
// Tunnel uses the k8s clientset to query the API server for services in the LoadBalancerEmulator.
@@ -131,8 +131,8 @@ func cleanupLock() {
131131
}
132132
}
133133

134-
func mustLockOrExit() {
135-
tunnelLockPath := filepath.Join(localpath.MiniPath(), ".tunnel_lock")
134+
func mustLockOrExit(profile string) {
135+
tunnelLockPath := filepath.Join(localpath.Profile(profile), ".tunnel_lock")
136136

137137
lockHandle = fslock.New(tunnelLockPath)
138138
err := lockHandle.TryLock()

0 commit comments

Comments
 (0)