[release-4.1] fix: make the prerelease version compatible (#6301)
fix: make the prerelease version compatible Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> Co-authored-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b252832d20
commit
d2f811b1a1
@@ -10,11 +10,13 @@ import (
|
||||
)
|
||||
|
||||
func ServeBatchV1beta1(k8sVersion *semver.Version) bool {
|
||||
c, _ := semver.NewConstraint("< 1.21")
|
||||
// add "-0" to make the prerelease version compatible.
|
||||
c, _ := semver.NewConstraint("< 1.21.0-0")
|
||||
return c.Check(k8sVersion)
|
||||
}
|
||||
|
||||
func ServeAutoscalingV2beta2(k8sVersion *semver.Version) bool {
|
||||
c, _ := semver.NewConstraint("< 1.23")
|
||||
// add "-0" to make the prerelease version compatible.
|
||||
c, _ := semver.NewConstraint("< 1.23.0-0")
|
||||
return c.Check(k8sVersion)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user