Update version check comment (#2234)

This commit is contained in:
Kenjiro Nakayama 2021-08-25 15:29:25 +09:00 committed by GitHub
parent a94f5f07b3
commit a4ed097995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -70,8 +70,7 @@ func CheckMinimumVersion(versioner discovery.ServerVersionInterface) error {
minimumVersion.Pre = []semver.PRVersion{{VersionNum: 0}}
}
// Compare returns 1 if the first version is greater than the
// second version.
// Return error if the current version is less than the minimum version required.
if currentVersion.LT(minimumVersion) {
if len(currentVersion.Pre) > 0 {
return fmt.Errorf("pre-release kubernetes version %q is not compatible, need at least %q (this can be overridden with the env var %q); note pre-release version is smaller than the corresponding release version (e.g. 1.x.y-z < 1.x.y), using 1.x.y-0 as the minimum version is likely to help in this case",