do not set global viper config

pull/12848/head
Medya Gh 2021-11-04 12:22:29 -07:00
parent a108c71ea9
commit 92cf41d686
1 changed files with 3 additions and 1 deletions

View File

@ -1529,7 +1529,9 @@ func isBaseImageApplicable(drv string) bool {
func getKubernetesVersion(old *config.ClusterConfig) string {
if viper.GetBool(noKubernetes) {
klog.Infof("No Kubernetes flag is set, setting Kubernetes version to %s", constants.NoKubernetesVersion)
viper.Set(kubernetesVersion, constants.NoKubernetesVersion)
if old != nil {
old.KubernetesConfig.KubernetesVersion = constants.NoKubernetesVersion
}
}
paramVersion := viper.GetString(kubernetesVersion)