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 {
|
||||
var paramVersion string
|
||||
if viper.GetBool(noKubernetes) {
|
||||
klog.Infof("No Kubernetes flag is set, setting Kubernetes version to %s", constants.NoKubernetesVersion)
|
||||
if old != nil {
|
||||
old.KubernetesConfig.KubernetesVersion = constants.NoKubernetesVersion
|
||||
}
|
||||
paramVersion = viper.GetString(constants.NoKubernetesVersion)
|
||||
} else {
|
||||
paramVersion = viper.GetString(kubernetesVersion)
|
||||
return viper.GetString(constants.NoKubernetesVersion)
|
||||
}
|
||||
|
||||
paramVersion := viper.GetString(kubernetesVersion)
|
||||
|
||||
// try to load the old version first if the user didn't specify anything
|
||||
if paramVersion == "" && old != nil {
|
||||
paramVersion = old.KubernetesConfig.KubernetesVersion
|
||||
|
|
Loading…
Reference in New Issue