From d7beb72025ad6e6f1437f52505a6ce6c0c1401a9 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 13:47:46 -0800 Subject: [PATCH 1/7] disable hyperkit driver on arm64 --- cmd/drivers/hyperkit/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/drivers/hyperkit/main.go b/cmd/drivers/hyperkit/main.go index 32788b0c2ba6..986993205398 100644 --- a/cmd/drivers/hyperkit/main.go +++ b/cmd/drivers/hyperkit/main.go @@ -1,4 +1,5 @@ // +build darwin +// -build arm64 /* Copyright 2016 The Kubernetes Authors All rights reserved. From 7536f4436c82dbade982713dcf16d9d0a8ebd143 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 16:15:28 -0800 Subject: [PATCH 2/7] Fix build constraints --- cmd/drivers/hyperkit/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/drivers/hyperkit/main.go b/cmd/drivers/hyperkit/main.go index 986993205398..ca8f90ce6a48 100644 --- a/cmd/drivers/hyperkit/main.go +++ b/cmd/drivers/hyperkit/main.go @@ -1,5 +1,4 @@ -// +build darwin -// -build arm64 +// +build darwin,!arm64 /* Copyright 2016 The Kubernetes Authors All rights reserved. From 60bafd00fae4d87c6b3d41ad05cee2e37d87675a Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 16:56:35 -0800 Subject: [PATCH 3/7] fix supported drivers list for darwin/arm64 --- pkg/minikube/driver/driver_darwin.go | 32 +++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/pkg/minikube/driver/driver_darwin.go b/pkg/minikube/driver/driver_darwin.go index 1eef33635ddc..168b3084d9a6 100644 --- a/pkg/minikube/driver/driver_darwin.go +++ b/pkg/minikube/driver/driver_darwin.go @@ -16,18 +16,30 @@ limitations under the License. package driver -import "os/exec" +import ( + "os/exec" + "runtime" +) // supportedDrivers is a list of supported drivers on Darwin. -var supportedDrivers = []string{ - VirtualBox, - Parallels, - VMwareFusion, - HyperKit, - VMware, - Docker, - SSH, -} +var supportedDrivers []string = func() []string { + if runtime.GOARCH == "arm64" { + // on darwin/arm64 only docker and ssh are supported yet + return []string{ + Docker, + SSH, + } + } + return []string{ + VirtualBox, + Parallels, + VMwareFusion, + HyperKit, + VMware, + Docker, + SSH, + } +}() func VBoxManagePath() string { cmd := "VBoxManage" From af5b44df126bbfd772f9b1b5650b07392e163a74 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 17:03:53 -0800 Subject: [PATCH 4/7] Fix "The driver {{.driver}} is not supported on {{.os}}/{{.arch}}" message --- cmd/minikube/cmd/start.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 08b9b0a21247..af2d485dd74e 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -573,7 +573,7 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis } ds := driver.Status(d) if ds.Name == "" { - exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": d, "os": runtime.GOOS}) + exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH}) } out.Step(style.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) return ds, nil, true @@ -583,7 +583,7 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis if d := viper.GetString("vm-driver"); d != "" { ds := driver.Status(viper.GetString("vm-driver")) if ds.Name == "" { - exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": d, "os": runtime.GOOS}) + exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH}) } out.Step(style.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) return ds, nil, true @@ -722,7 +722,7 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) { name := ds.Name klog.Infof("validating driver %q against %+v", name, existing) if !driver.Supported(name) { - exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": name, "os": runtime.GOOS}) + exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH} } // if we are only downloading artifacts for a driver, we can stop validation here From 3caf9c0f057ab880faa8d715fcfbf3b30625fc12 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 17:05:16 -0800 Subject: [PATCH 5/7] Fix "The driver {{.driver}} is not supported on {{.os}}/{{.arch}}" message --- cmd/minikube/cmd/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index af2d485dd74e..4271d70d17a0 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -722,7 +722,7 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) { name := ds.Name klog.Infof("validating driver %q against %+v", name, existing) if !driver.Supported(name) { - exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH} + exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH}) } // if we are only downloading artifacts for a driver, we can stop validation here From a99d545a54f6ca25249c58f2e1815aa52123684c Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Wed, 10 Feb 2021 17:06:20 -0800 Subject: [PATCH 6/7] Fix "The driver {{.driver}} is not supported on {{.os}}/{{.arch}}" message --- cmd/minikube/cmd/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 4271d70d17a0..61a6758820d1 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -722,7 +722,7 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) { name := ds.Name klog.Infof("validating driver %q against %+v", name, existing) if !driver.Supported(name) { - exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH}) + exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": name, "os": runtime.GOOS, "arch": runtime.GOARCH}) } // if we are only downloading artifacts for a driver, we can stop validation here From 306e7fedc4cb6a28eb73bba3844018e00c4dc943 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Thu, 11 Feb 2021 12:22:27 -0800 Subject: [PATCH 7/7] fix translations for unsupported driver changes --- translations/de.json | 2 +- translations/es.json | 2 +- translations/fr.json | 2 +- translations/ja.json | 2 +- translations/ko.json | 2 +- translations/pl.json | 2 +- translations/strings.txt | 2 +- translations/zh-CN.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/translations/de.json b/translations/de.json index 2aaee48299c3..86d0c28552aa 100644 --- a/translations/de.json +++ b/translations/de.json @@ -510,7 +510,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "Der Treiber '{{.driver}}' wird auf {{.os}} nicht unterstützt", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Der Treiber '{{.driver}}' wird auf {{.os}}/{{.arch}} nicht unterstützt", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", diff --git a/translations/es.json b/translations/es.json index 00a20bee7d6f..eacfaf1c1f6b 100644 --- a/translations/es.json +++ b/translations/es.json @@ -511,7 +511,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "El controlador \"{{.driver}}\" no se puede utilizar en {{.os}}", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "El controlador \"{{.driver}}\" no se puede utilizar en {{.os}}/{{.arch}}", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", diff --git a/translations/fr.json b/translations/fr.json index 27629f8b0500..d5734e4ef18b 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -513,7 +513,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "Le pilote \"{{.driver}}\" n'est pas compatible avec {{.os}}.", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Le pilote \"{{.driver}}\" n'est pas compatible avec {{.os}}/{{.arch}}.", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", diff --git a/translations/ja.json b/translations/ja.json index 1a13fdd8ff2e..993c78d7266d 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -507,7 +507,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "ドライバ「{{.driver}}」は、{{.os}} ではサポートされていません", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "ドライバ「{{.driver}}」は、{{.os}}/{{.arch}} ではサポートされていません", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", diff --git a/translations/ko.json b/translations/ko.json index 8f3fe07c8709..1fb76383b345 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -480,7 +480,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", "The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "", diff --git a/translations/pl.json b/translations/pl.json index d52ba3813c30..121292080de9 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -524,7 +524,7 @@ "The docker service is currently not active": "Serwis docker jest nieaktywny", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "Sterownik '{{.driver}} jest niewspierany przez system {{.os}}", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Sterownik '{{.driver}} jest niewspierany przez system {{.os}}/{{.arch}}", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", diff --git a/translations/strings.txt b/translations/strings.txt index 1187b0a510f0..c131b03eca60 100644 --- a/translations/strings.txt +++ b/translations/strings.txt @@ -426,7 +426,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "", "The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 59c8e8787aca..353234dc00a7 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -613,7 +613,7 @@ "The cri socket path to be used.": "", "The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "", "The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "", - "The driver '{{.driver}}' is not supported on {{.os}}": "{{.os}} 不支持驱动程序“{{.driver}}”", + "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "{{.os}} 不支持驱动程序“{{.driver}}/{{.arch}}”", "The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "", "The existing node configuration appears to be corrupt. Run 'minikube delete'": "", "The heapster addon is depreciated. please try to disable metrics-server instead": "",