From 6bbc5f986b5bfc1594f935a4a90a0f939e004d3b Mon Sep 17 00:00:00 2001 From: "Jituri, Pranav" Date: Sat, 21 Nov 2020 16:01:06 +0530 Subject: [PATCH 1/2] Enable Ingress Addon for Docker Windows --- pkg/addons/addons.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 12e80fabd58f..4a9a2e386991 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -145,14 +145,18 @@ func enableOrDisableAddon(cc *config.ClusterConfig, name string, val string) err // to match both ingress and ingress-dns addons if strings.HasPrefix(name, "ingress") && enable { - if driver.IsKIC(cc.Driver) && runtime.GOOS != "linux" { - exit.Message(reason.Usage, `Due to networking limitations of driver {{.driver_name}} on {{.os_name}}, {{.addon_name}} addon is not supported. + if driver.IsKIC(cc.Driver) { + if runtime.GOOS == "windows" { + out.Step(style.Tip,`After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1"`) + } else if runtime.GOOS != "linux" { + exit.Message(reason.Usage, `Due to networking limitations of driver {{.driver_name}} on {{.os_name}}, {{.addon_name}} addon is not supported. Alternatively to use this addon you can use a vm-based driver: 'minikube start --vm=true' To track the update on this work in progress feature please check: https://github.com/kubernetes/minikube/issues/7332`, out.V{"driver_name": cc.Driver, "os_name": runtime.GOOS, "addon_name": name}) + } } else if driver.BareMetal(cc.Driver) { exit.Message(reason.Usage, `Due to networking limitations of driver {{.driver_name}}, {{.addon_name}} addon is not supported. Try using a different driver.`, out.V{"driver_name": cc.Driver, "addon_name": name}) @@ -433,4 +437,4 @@ func Start(wg *sync.WaitGroup, cc *config.ClusterConfig, toEnable map[string]boo klog.Errorf("store failed: %v", err) } } -} +} \ No newline at end of file From 0ae11fd5c87c4c3adb35b811bce977c64e250365 Mon Sep 17 00:00:00 2001 From: "Jituri, Pranav" Date: Tue, 15 Dec 2020 18:22:36 +0530 Subject: [PATCH 2/2] fix linting error --- pkg/addons/addons.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 4a9a2e386991..9ef47ce7e70c 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -147,7 +147,7 @@ func enableOrDisableAddon(cc *config.ClusterConfig, name string, val string) err if strings.HasPrefix(name, "ingress") && enable { if driver.IsKIC(cc.Driver) { if runtime.GOOS == "windows" { - out.Step(style.Tip,`After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1"`) + out.Step(style.Tip, `After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1"`) } else if runtime.GOOS != "linux" { exit.Message(reason.Usage, `Due to networking limitations of driver {{.driver_name}} on {{.os_name}}, {{.addon_name}} addon is not supported. Alternatively to use this addon you can use a vm-based driver: @@ -437,4 +437,4 @@ func Start(wg *sync.WaitGroup, cc *config.ClusterConfig, toEnable map[string]boo klog.Errorf("store failed: %v", err) } } -} \ No newline at end of file +}