From a4ed0979953101bd6850254d65ff5defc785a637 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 25 Aug 2021 15:29:25 +0900 Subject: [PATCH] Update version check comment (#2234) --- version/version.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/version/version.go b/version/version.go index 86745aacb..f1e0cc42b 100644 --- a/version/version.go +++ b/version/version.go @@ -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",