Skip to content

Commit bc4c948

Browse files
committed
download hyperkit from 1.37.0 and warn user this is last release
1 parent 072b208 commit bc4c948

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

cmd/minikube/cmd/start.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,7 @@ func warnAboutMultiNodeCNI() {
535535
}
536536

537537
func updateDriver(driverName string) {
538-
v, err := version.GetSemverVersion()
539-
if err != nil {
540-
out.WarningT("Error parsing minikube version: {{.error}}", out.V{"error": err})
541-
} else if err := auxdriver.InstallOrUpdate(driverName, localpath.MakeMiniPath("bin"), v, viper.GetBool(flags.Interactive), viper.GetBool(autoUpdate)); err != nil {
538+
if err := auxdriver.InstallOrUpdate(driverName, localpath.MakeMiniPath("bin"), viper.GetBool(flags.Interactive), viper.GetBool(autoUpdate)); err != nil {
542539
if errors.Is(err, auxdriver.ErrAuxDriverVersionCommandFailed) {
543540
exit.Error(reason.DrvAuxNotHealthy, "Aux driver "+driverName, err)
544541
}

pkg/minikube/driver/auxdriver/install.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,18 @@ var ErrAuxDriverVersionCommandFailed error
5353
var ErrAuxDriverVersionNotinPath error
5454

5555
// InstallOrUpdate downloads driver if it is not present, or updates it if there's a newer version
56-
func InstallOrUpdate(name string, directory string, v semver.Version, interactive bool, autoUpdate bool) error {
56+
// this is currently only used for hyperkit driver on macOS
57+
func InstallOrUpdate(name string, directory string, interactive bool, autoUpdate bool) error {
5758
if name != driver.HyperKit {
5859
return nil
5960
}
61+
// v1.37.0 was the last release that we built hyperkit driver https://github.com/kubernetes/minikube/issues/21940
62+
// this will be used till we completely remove hyperkit driver support
63+
v, err := semver.Make("1.37.0")
64+
out.WarningT("Hyperkit driver will be removed in the next minikube release, we have other drivers that work on macOS such as docker or qemu, vfkit. Please consider switching to one of them. For more information, please visit: https://minikube.sigs.k8s.io/docs/drivers/hyperkit/")
65+
if err != nil {
66+
return errors.Wrap(err, "can't parse version")
67+
}
6068

6169
executable := fmt.Sprintf("docker-machine-driver-%s", name)
6270

test/integration/driver_install_or_update_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func TestHyperKitDriverInstallOrUpdate(t *testing.T) {
8383
t.Skipf("password required to execute 'sudo', skipping remaining test")
8484
}
8585

86-
err = auxdriver.InstallOrUpdate("hyperkit", dir, newerVersion, false, true)
86+
err = auxdriver.InstallOrUpdate("hyperkit", dir, false, true)
8787
if err != nil {
8888
t.Fatalf("Failed to update driver to %v. test: %s, got: %v", newerVersion, tc.name, err)
8989
}

0 commit comments

Comments
 (0)