Skip to content

Commit 350f8a2

Browse files
authored
Merge pull request #10452 from ilya-zuyev/ilyaz/disable_hyperv_on_m1
Disable all drivers except "docker" and "ssh" on darwin/arm64
2 parents ee6283e + 306e7fe commit 350f8a2

File tree

11 files changed

+34
-22
lines changed

11 files changed

+34
-22
lines changed

cmd/drivers/hyperkit/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build darwin
1+
// +build darwin,!arm64
22

33
/*
44
Copyright 2016 The Kubernetes Authors All rights reserved.

cmd/minikube/cmd/start.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis
563563
}
564564
ds := driver.Status(d)
565565
if ds.Name == "" {
566-
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": d, "os": runtime.GOOS})
566+
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH})
567567
}
568568
out.Step(style.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()})
569569
return ds, nil, true
@@ -573,7 +573,7 @@ func selectDriver(existing *config.ClusterConfig) (registry.DriverState, []regis
573573
if d := viper.GetString("vm-driver"); d != "" {
574574
ds := driver.Status(viper.GetString("vm-driver"))
575575
if ds.Name == "" {
576-
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": d, "os": runtime.GOOS})
576+
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": d, "os": runtime.GOOS, "arch": runtime.GOARCH})
577577
}
578578
out.Step(style.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()})
579579
return ds, nil, true
@@ -712,7 +712,7 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) {
712712
name := ds.Name
713713
klog.Infof("validating driver %q against %+v", name, existing)
714714
if !driver.Supported(name) {
715-
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}", out.V{"driver": name, "os": runtime.GOOS})
715+
exit.Message(reason.DrvUnsupportedOS, "The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}", out.V{"driver": name, "os": runtime.GOOS, "arch": runtime.GOARCH})
716716
}
717717

718718
// if we are only downloading artifacts for a driver, we can stop validation here

pkg/minikube/driver/driver_darwin.go

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,30 @@ limitations under the License.
1616

1717
package driver
1818

19-
import "os/exec"
19+
import (
20+
"os/exec"
21+
"runtime"
22+
)
2023

2124
// supportedDrivers is a list of supported drivers on Darwin.
22-
var supportedDrivers = []string{
23-
VirtualBox,
24-
Parallels,
25-
VMwareFusion,
26-
HyperKit,
27-
VMware,
28-
Docker,
29-
SSH,
30-
}
25+
var supportedDrivers []string = func() []string {
26+
if runtime.GOARCH == "arm64" {
27+
// on darwin/arm64 only docker and ssh are supported yet
28+
return []string{
29+
Docker,
30+
SSH,
31+
}
32+
}
33+
return []string{
34+
VirtualBox,
35+
Parallels,
36+
VMwareFusion,
37+
HyperKit,
38+
VMware,
39+
Docker,
40+
SSH,
41+
}
42+
}()
3143

3244
func VBoxManagePath() string {
3345
cmd := "VBoxManage"

translations/de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@
510510
"The cri socket path to be used.": "",
511511
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
512512
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
513-
"The driver '{{.driver}}' is not supported on {{.os}}": "Der Treiber '{{.driver}}' wird auf {{.os}} nicht unterstützt",
513+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Der Treiber '{{.driver}}' wird auf {{.os}}/{{.arch}} nicht unterstützt",
514514
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
515515
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
516516
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

translations/es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@
511511
"The cri socket path to be used.": "",
512512
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
513513
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
514-
"The driver '{{.driver}}' is not supported on {{.os}}": "El controlador \"{{.driver}}\" no se puede utilizar en {{.os}}",
514+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "El controlador \"{{.driver}}\" no se puede utilizar en {{.os}}/{{.arch}}",
515515
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
516516
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
517517
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

translations/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@
513513
"The cri socket path to be used.": "",
514514
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
515515
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
516-
"The driver '{{.driver}}' is not supported on {{.os}}": "Le pilote \"{{.driver}}\" n'est pas compatible avec {{.os}}.",
516+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Le pilote \"{{.driver}}\" n'est pas compatible avec {{.os}}/{{.arch}}.",
517517
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
518518
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
519519
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

translations/ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@
507507
"The cri socket path to be used.": "",
508508
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
509509
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
510-
"The driver '{{.driver}}' is not supported on {{.os}}": "ドライバ「{{.driver}}」は、{{.os}} ではサポートされていません",
510+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "ドライバ「{{.driver}}」は、{{.os}}/{{.arch}} ではサポートされていません",
511511
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
512512
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
513513
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

translations/ko.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@
480480
"The cri socket path to be used.": "",
481481
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
482482
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
483-
"The driver '{{.driver}}' is not supported on {{.os}}": "",
483+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "",
484484
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
485485
"The heapster addon is depreciated. please try to disable metrics-server instead": "",
486486
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "",

translations/pl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@
524524
"The docker service is currently not active": "Serwis docker jest nieaktywny",
525525
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
526526
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
527-
"The driver '{{.driver}}' is not supported on {{.os}}": "Sterownik '{{.driver}} jest niewspierany przez system {{.os}}",
527+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "Sterownik '{{.driver}} jest niewspierany przez system {{.os}}/{{.arch}}",
528528
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
529529
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
530530
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

translations/strings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"The cri socket path to be used.": "",
427427
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
428428
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
429-
"The driver '{{.driver}}' is not supported on {{.os}}": "",
429+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "",
430430
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
431431
"The heapster addon is depreciated. please try to disable metrics-server instead": "",
432432
"The hyperv virtual switch name. Defaults to first found. (hyperv driver only)": "",

translations/zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@
613613
"The cri socket path to be used.": "",
614614
"The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/": "",
615615
"The docker-env command is only compatible with the \"docker\" runtime, but this cluster was configured to use the \"{{.runtime}}\" runtime.": "",
616-
"The driver '{{.driver}}' is not supported on {{.os}}": "{{.os}} 不支持驱动程序“{{.driver}}”",
616+
"The driver '{{.driver}}' is not supported on {{.os}}/{{.arch}}": "{{.os}} 不支持驱动程序“{{.driver}}/{{.arch}}”",
617617
"The existing \"{{.name}}\" cluster was created using the \"{{.old}}\" driver, which is incompatible with requested \"{{.new}}\" driver.": "",
618618
"The existing node configuration appears to be corrupt. Run 'minikube delete'": "",
619619
"The heapster addon is depreciated. please try to disable metrics-server instead": "",

0 commit comments

Comments
 (0)