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

Fix hard coded docker driver in minikube service command #13514

Merged
merged 1 commit into from
Feb 1, 2022
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/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ You may select another namespace by using 'minikube service {{.service}} -n <nam
}

if driver.NeedsPortForward(co.Config.Driver) {
startKicServiceTunnel(svc, cname)
startKicServiceTunnel(svc, cname, co.Config.Driver)
return
}

Expand All @@ -111,7 +111,7 @@ func init() {
serviceCmd.PersistentFlags().StringVar(&serviceURLFormat, "format", defaultServiceFormatTemplate, "Format to output service URL in. This format will be applied to each url individually and they will be printed one at a time.")
}

func startKicServiceTunnel(svc, configName string) {
func startKicServiceTunnel(svc, configName, driverName string) {
ctrlC := make(chan os.Signal, 1)
signal.Notify(ctrlC, os.Interrupt)

Expand All @@ -120,7 +120,7 @@ func startKicServiceTunnel(svc, configName string) {
exit.Error(reason.InternalKubernetesClient, "error creating clientset", err)
}

port, err := oci.ForwardedPort(oci.Docker, configName, 22)
port, err := oci.ForwardedPort(driverName, configName, 22)
if err != nil {
exit.Error(reason.DrvPortForward, "error getting ssh port", err)
}
Expand Down