diff --git a/kola/tests/kubeadm/kubeadm.go b/kola/tests/kubeadm/kubeadm.go index 8165ee2f1..a480f2cd3 100644 --- a/kola/tests/kubeadm/kubeadm.go +++ b/kola/tests/kubeadm/kubeadm.go @@ -17,6 +17,7 @@ import ( "bytes" "encoding/base64" "fmt" + "math" "strings" "text/template" "time" @@ -146,10 +147,12 @@ func init() { testParams["Release"] = version cgroupSuffix := "" - var major int64 = 0 + var majorMinVersion int64 = 0 + var majorEndVersion int64 = math.MaxInt64 if testParams["cgroupv1"].(bool) { cgroupSuffix = ".cgroupv1" - major = 3140 + majorMinVersion = 3140 + majorEndVersion = 4152 } if CNI == "flannel" { @@ -161,7 +164,7 @@ func init() { // Careful, so we don't lower // the min version too much. if mmv > major { - major = mmv + majorMinVersion = mmv } } @@ -174,7 +177,8 @@ func init() { Run: func(c cluster.TestCluster) { kubeadmBaseTest(c, testParams) }, - MinVersion: semver.Version{Major: major}, + MinVersion: semver.Version{Major: majorMinVersion}, + EndVersion: semver.Version{Major: majorEndVersion}, Flags: flags, }) }