Merge branch 'master' of https://github.com/kubernetes/minikube into improve-proxy-test-coverage

pull/5228/head
Marcin Niemira 2019-08-30 00:23:12 +10:00
commit f62fabce4c
No known key found for this signature in database
GPG Key ID: 5395D4A81A3FA475
2 changed files with 6 additions and 9 deletions

1
OWNERS
View File

@ -6,6 +6,7 @@ reviewers:
- sharifelgamal
- RA489
- medyagh
- josedonizetti
approvers:
- tstromberg
- afbjorklund

View File

@ -970,18 +970,14 @@ func saveConfig(clusterCfg *cfg.Config) error {
}
func validateDriverVersion(vmDriver string) {
var (
driverExecutable string
driverDocumentation string
)
var driverExecutable string
driverDocumentation := fmt.Sprintf("%s%s#driver-installation", constants.DriverDocumentation, vmDriver)
switch vmDriver {
case constants.DriverKvm2:
driverExecutable = fmt.Sprintf("docker-machine-driver-%s", constants.DriverKvm2)
driverDocumentation = fmt.Sprintf("%s#%s", constants.DriverDocumentation, "kvm2-upgrade")
case constants.DriverHyperkit:
driverExecutable = fmt.Sprintf("docker-machine-driver-%s", constants.DriverHyperkit)
driverDocumentation = fmt.Sprintf("%s#%s", constants.DriverDocumentation, "hyperkit-upgrade")
default: // driver doesn't support version
return
}
@ -1002,7 +998,7 @@ func validateDriverVersion(vmDriver string) {
if len(v) == 0 && !viper.GetBool(force) {
exit.WithCodeT(
exit.Failure,
"Please upgrade the '{{.driver_executable}}'. {{.documentation_url}}",
"The installed version of '{{.driver_executable}}' is obsolete. Upgrade: {{.documentation_url}}",
out.V{"driver_executable": driverExecutable, "documentation_url": driverDocumentation},
)
}
@ -1021,8 +1017,8 @@ func validateDriverVersion(vmDriver string) {
if vmDriverVersion.LT(minikubeVersion) {
out.WarningT(
"There's a new version for '{{.driver_executable}}'. Please consider upgrading. {{.documentation_url}}",
out.V{"driver_executable": driverExecutable, "documentation_url": driverDocumentation},
"The installed version of '{{.driver_executable}}' ({{.driver_version}}) is no longer current. Upgrade: {{.documentation_url}}",
out.V{"driver_executable": driverExecutable, "driver_version": vmDriverVersion, "documentation_url": driverDocumentation},
)
}
}