Merge pull request #6292 from afbjorklund/profile-version

Handle empty k8s version in existing profile
pull/6243/head
Medya Ghazizadeh 2020-01-13 12:50:14 -08:00 committed by GitHub
commit f5ce7d9e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1165,9 +1165,10 @@ func getKubernetesVersion(old *cfg.MachineConfig) (string, bool) {
isUpgrade := false
if paramVersion == "" { // if the user did not specify any version then ...
if old != nil { // .. use the old version from config
if old != nil { // .. use the old version from config (if any)
paramVersion = old.KubernetesConfig.KubernetesVersion
} else { // .. otherwise use the default version
}
if paramVersion == "" { // .. otherwise use the default version
paramVersion = constants.DefaultKubernetesVersion
}
}