From 4f3a83c68000a634ef2a3d714ac30ef7869e880d Mon Sep 17 00:00:00 2001 From: josedonizetti Date: Thu, 4 Jul 2019 10:16:39 -0300 Subject: [PATCH] Add upgrade documentation to kvm version warn --- cmd/minikube/cmd/start.go | 8 ++++---- cmd/minikube/cmd/start_test.go | 2 +- pkg/minikube/constants/constants.go | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index b0cefc4414f7..57e0c0b8280f 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -1,5 +1,5 @@ /* -Copyright 2019 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -870,7 +870,7 @@ func validateDriverVersion(vmDriver string) { // if the driver doesn't have return any version, it is really old, we force a upgrade. if len(v) == 0 { - exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'.") + exit.WithCode(exit.Failure, "Please upgrade the 'docker-machine-driver-kvm2'. %s", constants.KVMDocumentation) } vmDriverVersion, err := semver.Make(v) @@ -886,13 +886,13 @@ func validateDriverVersion(vmDriver string) { } if vmDriverVersion.LT(minikubeVersion) { - console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading.") + console.Warning("The 'docker-machine-driver-kvm2' version is old. Please consider upgrading. %s", constants.KVMDocumentation) } } } // extractVMDriverVersion extracts the driver version. -// KVM and Hyperkit drivers support the `version` command, that display the information as: +// KVM and Hyperkit drivers support the 'version' command, that display the information as: // version: vX.X.X // commit: XXXX // This method returns the version 'vX.X.X' or empty if the version isn't found. diff --git a/cmd/minikube/cmd/start_test.go b/cmd/minikube/cmd/start_test.go index fc97b968873c..446091c17f0e 100644 --- a/cmd/minikube/cmd/start_test.go +++ b/cmd/minikube/cmd/start_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2019 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 6f4fd5f2d4d7..934ba428cf4d 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -431,3 +431,8 @@ const ( // GvisorURL is the url to download gvisor GvisorURL = "https://storage.googleapis.com/gvisor/releases/nightly/2018-12-07/runsc" ) + +const ( + // KVMDocumentation the documentation of the KVM driver + KVMDocumentation = "https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver" +)