fix duplication
parent
c7b2561134
commit
af9184b712
|
@ -1723,22 +1723,6 @@ func validateKubernetesVersion(old *config.ClusterConfig) {
|
|||
exitIfNotForced(reason.KubernetesTooNew, "Kubernetes version {{.version}} is not supported by this release of minikube", out.V{"version": nvs})
|
||||
}
|
||||
}
|
||||
if contains(constants.ValidKubernetesVersions, kubernetesVer) {
|
||||
out.Styled(style.Check, "Kubernetes version {{.specified}} found in version list", out.V{"specified": nvs})
|
||||
} else {
|
||||
out.WarningT("Specified Kubernetes version {{.specified}} not found in Kubernetes version list", out.V{"specified": nvs})
|
||||
out.Styled(style.Verifying, "Searching the internet for Kubernetes version...")
|
||||
found, err := cmdcfg.IsInGitHubKubernetesVersions(kubernetesVer)
|
||||
if err != nil && !viper.GetBool(force) {
|
||||
exit.Error(reason.KubernetesNotConnect, "error fetching Kubernetes version list from GitHub", err)
|
||||
}
|
||||
if found {
|
||||
out.Styled(style.Check, "Kubernetes version {{.specified}} found in GitHub version list", out.V{"specified": nvs})
|
||||
} else if !viper.GetBool(force) {
|
||||
out.WarningT("Kubernetes version not found in GitHub version list. You can force a Kubernetes version via the --force flag")
|
||||
exitIfNotForced(reason.KubernetesTooNew, "Kubernetes version {{.version}} is not supported by this release of minikube", out.V{"version": nvs})
|
||||
}
|
||||
}
|
||||
}
|
||||
if nvs.LT(oldestVersion) {
|
||||
out.WarningT("Specified Kubernetes version {{.specified}} is less than the oldest supported version: {{.oldest}}. Use `minikube config defaults kubernetes-version` for details.", out.V{"specified": nvs, "oldest": constants.OldestKubernetesVersion})
|
||||
|
|
Loading…
Reference in New Issue