Skip to content

Commit

Permalink
Disable tests with down-rev agents
Browse files Browse the repository at this point in the history
These are broken by AuthorizeNodeWithSelectors being on by default. All
agents must be upgraded to v1.32 or newer to work properly, until we
backport RBAC changes to older branches.

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Dec 20, 2024
1 parent b474770 commit a30ce2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
9 changes: 7 additions & 2 deletions tests/docker/skew/skew_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ var _ = BeforeSuite(func() {
// For master and unreleased branches, we want the latest stable release
var upgradeChannel string
var err error
if *branch == "master" {
if *branch == "master" || *branch == "release-v1.32" {
// disabled: AuthorizeNodeWithSelectors is now on by default, which breaks compat with agents < v1.32.
// This can be ren-enabled once the previous branch is v1.32 or higher, or when RBAC changes have been backported.
// ref: https://github.com/kubernetes/kubernetes/pull/128168
Skip("Skipping version skew tests for " + *branch + " due to AuthorizeNodeWithSelectors")

upgradeChannel = "stable"
} else {
upgradeChannel = strings.Replace(*branch, "release-", "v", 1)
Expand All @@ -48,11 +53,11 @@ var _ = BeforeSuite(func() {
lastMinorVersion, err = tester.GetVersionFromChannel(upgradeChannel)
Expect(err).NotTo(HaveOccurred())
Expect(lastMinorVersion).To(ContainSubstring("v1."))

fmt.Println("Using last minor version: ", lastMinorVersion)
})

var _ = Describe("Skew Tests", Ordered, func() {

Context("Setup Cluster with Server newer than Agent", func() {
It("should provision new servers and old agents", func() {
var err error
Expand Down
15 changes: 12 additions & 3 deletions tests/docker/test-run-compat
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ LATEST_VERSION=$(curl -s https://update.k3s.io/v1-release/channels/latest -o /de

# --- create a basic cluster to test for compat with the previous minor version of the server and agent
K3S_IMAGE_SERVER=${REPO}/${IMAGE_NAME}:${PREVIOUS_VERSION} LABEL=PREVIOUS-SERVER run-test
K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${PREVIOUS_VERSION} LABEL=PREVIOUS-AGENT run-test
# disabled: AuthorizeNodeWithSelectors is now on by default, which breaks compat with agents < v1.32.
# This can be ren-enabled once the previous branch is v1.32 or higher, or when RBAC changes have been backported.
# ref: https://github.com/kubernetes/kubernetes/pull/128168
#K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${PREVIOUS_VERSION} LABEL=PREVIOUS-AGENT run-test

# --- create a basic cluster to test for compat with the stable version of the server and agent
K3S_IMAGE_SERVER=${REPO}/${IMAGE_NAME}:${STABLE_VERSION} LABEL=STABLE-SERVER run-test
K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${STABLE_VERSION} LABEL=STABLE-AGENT run-test
# disabled: AuthorizeNodeWithSelectors is now on by default, which breaks compat with agents < v1.32
# This can be ren-enabled once the stable release is v1.32 or higher, or when RBAC changes have been backported.
# ref: https://github.com/kubernetes/kubernetes/pull/128168
#K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${STABLE_VERSION} LABEL=STABLE-AGENT run-test

# --- create a basic cluster to test for compat with the latest version of the server and agent
K3S_IMAGE_SERVER=${REPO}/${IMAGE_NAME}:${LATEST_VERSION} LABEL=LATEST-SERVER run-test
K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${LATEST_VERSION} LABEL=LATEST-AGENT run-test
# disabled: AuthorizeNodeWithSelectors is now on by default, which breaks compat with agents < v1.32
# This can be ren-enabled once the latest release is v1.32 or higher, or when RBAC changes have been backported.
# ref: https://github.com/kubernetes/kubernetes/pull/128168
#K3S_IMAGE_AGENT=${REPO}/${IMAGE_NAME}:${LATEST_VERSION} LABEL=LATEST-AGENT run-test

cleanup-test-env

0 comments on commit a30ce2f

Please sign in to comment.