kubeadm: Supports() return true for all alpha/beta/ga/deprecated

This commit is contained in:
Paco Xu 2023-05-26 16:03:06 +08:00
parent 6a867eacd8
commit 0951204298
2 changed files with 2 additions and 3 deletions

View File

@ -205,7 +205,6 @@ func enforceRequirements(flags *applyPlanFlags, args []string, dryRun bool, upgr
for _, m := range msg {
printer.Printf("[upgrade/config] %s\n", m)
}
return nil, nil, nil, errors.New("[upgrade/config] FATAL. Unable to upgrade a cluster using deprecated feature-gate flags. Please see the release notes")
}
// If the user told us to print this information out; do it!

View File

@ -91,9 +91,9 @@ func Enabled(featureList map[string]bool, featureName string) bool {
// Supports indicates whether a feature name is supported on the given
// feature set
func Supports(featureList FeatureList, featureName string) bool {
for k, v := range featureList {
for k := range featureList {
if featureName == k {
return v.PreRelease != featuregate.Deprecated
return true
}
}
return false