Skip to content

Commit

Permalink
Merge pull request #13514 from presztak/service_docker_hard_coded
Browse files Browse the repository at this point in the history
Fix hard coded docker driver in minikube service command
  • Loading branch information
medyagh committed Feb 1, 2022
2 parents 2cbe070 + dd431d3 commit 30b187f
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 30b187f

Please sign in to comment.