From d55293adf6f48a4bf9d5925895e55676243b6b25 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Fri, 20 Dec 2024 00:15:57 +0000 Subject: [PATCH] Disable tests with down-rev agents 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 --- tests/docker/skew/skew_test.go | 9 +++++++-- tests/docker/test-run-compat | 15 ++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/tests/docker/skew/skew_test.go b/tests/docker/skew/skew_test.go index 65b827c8d9c2..0fa4c1d76627 100644 --- a/tests/docker/skew/skew_test.go +++ b/tests/docker/skew/skew_test.go @@ -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) @@ -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 diff --git a/tests/docker/test-run-compat b/tests/docker/test-run-compat index 87cb89c00ab9..ec71f4a74c06 100755 --- a/tests/docker/test-run-compat +++ b/tests/docker/test-run-compat @@ -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