From 954f5a6b7448c82fd307e0bd4da1e119a3468049 Mon Sep 17 00:00:00 2001 From: Jose Donizetti Date: Fri, 28 Feb 2020 14:57:53 -0300 Subject: [PATCH] kic: fix service list for docker on osx --- cmd/minikube/cmd/service_list.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/minikube/cmd/service_list.go b/cmd/minikube/cmd/service_list.go index d2bc661c6695..9d86d5a8b8ca 100644 --- a/cmd/minikube/cmd/service_list.go +++ b/cmd/minikube/cmd/service_list.go @@ -66,17 +66,18 @@ var serviceListCmd = &cobra.Command{ if len(serviceURL.URLs) == 0 { data = append(data, []string{serviceURL.Namespace, serviceURL.Name, "No node port"}) } else { - data = append(data, []string{serviceURL.Namespace, serviceURL.Name, "", strings.Join(serviceURL.URLs, "\n")}) + serviceURLs := strings.Join(serviceURL.URLs, "\n") - } + // if we are running Docker on OSX we empty the internal service URLs + if runtime.GOOS == "darwin" && cfg.Driver == oci.Docker { + serviceURLs = "" + } - } - service.PrintServiceList(os.Stdout, data) - if runtime.GOOS == "darwin" && cfg.Driver == oci.Docker { - out.FailureT("Accessing service is not implemented yet for docker driver on Mac.\nThe following issue is tracking the in progress work::\nhttps://github.com/kubernetes/minikube/issues/6778") - exit.WithCodeT(exit.Failure, "Not yet implemented for docker driver on MacOS.") + data = append(data, []string{serviceURL.Namespace, serviceURL.Name, "", serviceURLs}) + } } + service.PrintServiceList(os.Stdout, data) }, }