From b27440d4aeabe0657f77a02f80acd8a300d4ac4d Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Tue, 28 Jul 2020 21:44:30 +0100 Subject: [PATCH 1/3] Add warning for ingress addon with driver of none --- pkg/addons/addons.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 8d496c0b1f3a..d1bb72841c77 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -141,15 +141,17 @@ func enableOrDisableAddon(cc *config.ClusterConfig, name string, val string) err } } - // to match both ingress and ingress-dns adons - if strings.HasPrefix(name, "ingress") && enable && driver.IsKIC(cc.Driver) && runtime.GOOS != "linux" { - exit.UsageT(`Due to {{.driver_name}} networking limitations on {{.os_name}}, {{.addon_name}} addon is not supported for this driver. + // to match both ingress and ingress-dns addons + if strings.HasPrefix(name, "ingress") && enable { + if driver.IsKIC(cc.Driver) && runtime.GOOS != "linux" || driver.BareMetal(cc.Driver) { + exit.UsageT(`Due to {{.driver_name}} networking limitations on {{.os_name}}, {{.addon_name}} addon is not supported for this driver. 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}) + } } if strings.HasPrefix(name, "istio") && enable { From 4b2974472d0a652d646cc268d5e3516f0c5bf17f Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Tue, 28 Jul 2020 22:28:57 +0100 Subject: [PATCH 2/3] Improve error message text --- pkg/addons/addons.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index d1bb72841c77..8d59326fbdfb 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -143,14 +143,17 @@ 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" || driver.BareMetal(cc.Driver) { - exit.UsageT(`Due to {{.driver_name}} networking limitations on {{.os_name}}, {{.addon_name}} addon is not supported for this driver. + if driver.IsKIC(cc.Driver) && runtime.GOOS != "linux" { + exit.UsageT(`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.UsageT(`Due to networking limitations of driver {{.driver_name}}, {{.addon_name}} addon is not supported. +Try using a supported driver: "--driver=docker", or "--driver=podman", or "--driver=hyperkit"`, out.V{"driver_name": cc.Driver, "addon_name": name}) } } From 9c23485dfbd57ce7bfa58322957e6766ba764816 Mon Sep 17 00:00:00 2001 From: Dean Coakley Date: Wed, 29 Jul 2020 09:31:37 +0100 Subject: [PATCH 3/3] Remove list of alternative drivers --- 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 8d59326fbdfb..6272c33481f6 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -152,8 +152,8 @@ Alternatively to use this addon you can use a vm-based driver: 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.UsageT(`Due to networking limitations of driver {{.driver_name}}, {{.addon_name}} addon is not supported. -Try using a supported driver: "--driver=docker", or "--driver=podman", or "--driver=hyperkit"`, out.V{"driver_name": cc.Driver, "addon_name": name}) + exit.UsageT(`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}) } }