Skip to content

Commit 4f3a83c

Browse files
committed
Add upgrade documentation to kvm version warn
1 parent d6ab605 commit 4f3a83c

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Diff for: cmd/minikube/cmd/start.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019 The Kubernetes Authors All rights reserved.
2+
Copyright 2016 The Kubernetes Authors All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -870,7 +870,7 @@ func validateDriverVersion(vmDriver string) {
870870

871871
// if the driver doesn't have return any version, it is really old, we force a upgrade.
872872
if len(v) == 0 {
873-
exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'.")
873+
exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'. %s", constants.KVMDocumentation)
874874
}
875875

876876
vmDriverVersion, err := semver.Make(v)
@@ -886,13 +886,13 @@ func validateDriverVersion(vmDriver string) {
886886
}
887887

888888
if vmDriverVersion.LT(minikubeVersion) {
889-
console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading.")
889+
console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. %s", constants.KVMDocumentation)
890890
}
891891
}
892892
}
893893

894894
// extractVMDriverVersion extracts the driver version.
895-
// KVM and Hyperkit drivers support the `version` command, that display the information as:
895+
// KVM and Hyperkit drivers support the 'version' command, that display the information as:
896896
// version: vX.X.X
897897
// commit: XXXX
898898
// This method returns the version 'vX.X.X' or empty if the version isn't found.

Diff for: cmd/minikube/cmd/start_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2016 The Kubernetes Authors All rights reserved.
2+
Copyright 2019 The Kubernetes Authors All rights reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

Diff for: pkg/minikube/constants/constants.go

+5
Original file line numberDiff line numberDiff line change
@@ -431,3 +431,8 @@ const (
431431
// GvisorURL is the url to download gvisor
432432
GvisorURL = "https://storage.googleapis.com/gvisor/releases/nightly/2018-12-07/runsc"
433433
)
434+
435+
const (
436+
// KVMDocumentation the documentation of the KVM driver
437+
KVMDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver"
438+
)

0 commit comments

Comments
 (0)