Skip to content

Commit

Permalink
cgroupv1: kubeadm: do not run tests for version >= 4152
Browse files Browse the repository at this point in the history
  • Loading branch information
ader1990 committed Dec 2, 2024
1 parent 5fe8bbd commit 6642c50
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions kola/tests/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"bytes"
"encoding/base64"
"fmt"
"math"
"strings"
"text/template"
"time"
Expand Down Expand Up @@ -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" {
Expand All @@ -160,8 +163,8 @@ func init() {
mmv := (int64)(mmvi.(int))
// Careful, so we don't lower
// the min version too much.
if mmv > major {
major = mmv
if mmv > majorMinVersion {
majorMinVersion = mmv
}
}

Expand All @@ -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,
})
}
Expand Down

0 comments on commit 6642c50

Please sign in to comment.