Return NoKubernetesVersion if noKubernetes is true.
parent
609fa0946c
commit
38358b9b63
|
@ -1540,17 +1540,16 @@ func isBaseImageApplicable(drv string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getKubernetesVersion(old *config.ClusterConfig) string {
|
func getKubernetesVersion(old *config.ClusterConfig) string {
|
||||||
var paramVersion string
|
|
||||||
if viper.GetBool(noKubernetes) {
|
if viper.GetBool(noKubernetes) {
|
||||||
klog.Infof("No Kubernetes flag is set, setting Kubernetes version to %s", constants.NoKubernetesVersion)
|
klog.Infof("No Kubernetes flag is set, setting Kubernetes version to %s", constants.NoKubernetesVersion)
|
||||||
if old != nil {
|
if old != nil {
|
||||||
old.KubernetesConfig.KubernetesVersion = constants.NoKubernetesVersion
|
old.KubernetesConfig.KubernetesVersion = constants.NoKubernetesVersion
|
||||||
}
|
}
|
||||||
paramVersion = viper.GetString(constants.NoKubernetesVersion)
|
return viper.GetString(constants.NoKubernetesVersion)
|
||||||
} else {
|
|
||||||
paramVersion = viper.GetString(kubernetesVersion)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paramVersion := viper.GetString(kubernetesVersion)
|
||||||
|
|
||||||
// try to load the old version first if the user didn't specify anything
|
// try to load the old version first if the user didn't specify anything
|
||||||
if paramVersion == "" && old != nil {
|
if paramVersion == "" && old != nil {
|
||||||
paramVersion = old.KubernetesConfig.KubernetesVersion
|
paramVersion = old.KubernetesConfig.KubernetesVersion
|
||||||
|
|
Loading…
Reference in New Issue