Commit 61892063 authored by Pablo Caderno's avatar Pablo Caderno Committed by Pablo Caderno

Fixed error parsing old version "latest" or "stable"

Fixes #8210
Signed-off-by: Pablo Caderno's avatarkadern0 <[email protected]>
parent 25045cfc
......@@ -479,7 +479,14 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
}
if cmd.Flags().Changed(kubernetesVersion) {
cc.KubernetesConfig.KubernetesVersion = viper.GetString(kubernetesVersion)
switch viper.GetString(kubernetesVersion) {
case "latest":
existing.KubernetesConfig.KubernetesVersion = constants.NewestKubernetesVersion
case "stable":
existing.KubernetesConfig.KubernetesVersion = constants.DefaultKubernetesVersion
default:
existing.KubernetesConfig.KubernetesVersion = viper.GetString(kubernetesVersion)
}
}
if cmd.Flags().Changed(apiServerName) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment