Merge pull request #12976 from spowelljr/outputTunnelHasStarted
Output tunnel has started message so users aren't confused if tunnel is runningpull/12979/head
commit
355fe0e2bc
|
@ -33,7 +33,9 @@ import (
|
|||
"k8s.io/minikube/pkg/minikube/exit"
|
||||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
"k8s.io/minikube/pkg/minikube/mustload"
|
||||
"k8s.io/minikube/pkg/minikube/out"
|
||||
"k8s.io/minikube/pkg/minikube/reason"
|
||||
"k8s.io/minikube/pkg/minikube/style"
|
||||
"k8s.io/minikube/pkg/minikube/tunnel"
|
||||
"k8s.io/minikube/pkg/minikube/tunnel/kic"
|
||||
)
|
||||
|
@ -86,6 +88,7 @@ var tunnelCmd = &cobra.Command{
|
|||
sshPort := strconv.Itoa(port)
|
||||
sshKey := filepath.Join(localpath.MiniPath(), "machines", cname, "id_rsa")
|
||||
|
||||
outputTunnelStarted()
|
||||
kicSSHTunnel := kic.NewSSHTunnel(ctx, sshPort, sshKey, clientset.CoreV1(), clientset.NetworkingV1())
|
||||
err = kicSSHTunnel.Start()
|
||||
if err != nil {
|
||||
|
@ -103,6 +106,13 @@ var tunnelCmd = &cobra.Command{
|
|||
},
|
||||
}
|
||||
|
||||
func outputTunnelStarted() {
|
||||
out.Styled(style.Success, "Tunnel successfully started")
|
||||
out.Ln("")
|
||||
out.Styled(style.Notice, "NOTE: Please do not close this terminal as this process must stay alive for the tunnel to be accessible ...")
|
||||
out.Ln("")
|
||||
}
|
||||
|
||||
func init() {
|
||||
tunnelCmd.Flags().BoolVarP(&cleanup, "cleanup", "c", true, "call with cleanup=true to remove old tunnels")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue