From 89994aaf12f576f55232332629604cadd04783ac Mon Sep 17 00:00:00 2001 From: Rahul Ganesh Date: Fri, 20 Mar 2026 19:15:35 -0700 Subject: [PATCH] Backport tinkerbell e2e test fixes to release-0.24 - Clear stale bootstrap IP annotation in bare metal API upgrade flow to prevent controller from regenerating machine templates with the bootstrap IP instead of tinkerbellIP (#10651) - Increase hardware count for AddWorkerNodeGroup API tests from 2 to 3 to account for CP + existing worker + new worker group (#10669) - Add missing licenseToken to K8s 1.31 CP upgrade tests (131To132UpgradeCPOnly, 130To131UpgradeWorkerOnly) which were failing validation for extended kubernetes support Signed-off-by: Rahul Ganesh --- test/e2e/TINKERBELL_HARDWARE_COUNT.yaml | 6 +++--- test/e2e/tinkerbell_test.go | 8 ++++++++ test/e2e/upgrade.go | 6 ++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/test/e2e/TINKERBELL_HARDWARE_COUNT.yaml b/test/e2e/TINKERBELL_HARDWARE_COUNT.yaml index 43a8a0ca1d1c..e735de67f887 100644 --- a/test/e2e/TINKERBELL_HARDWARE_COUNT.yaml +++ b/test/e2e/TINKERBELL_HARDWARE_COUNT.yaml @@ -168,9 +168,9 @@ TestTinkerbellKubernetes133UbuntuTo134SingleNodeInPlaceUpgrade: 1 TestTinkerbellKubernetes133RedHat9To134SingleNodeInPlaceUpgrade: 1 TestTinkerbellKubernetes128UpgradeManagementComponents: 2 TestTinkerbellKubernetes128UbuntuTo132MultipleUpgrade: 4 -TestTinkerbellKubernetes132UbuntuAddWorkerNodeGroupWithAPI: 2 -TestTinkerbellKubernetes134UbuntuAddWorkerNodeGroupWithAPI: 2 -TestTinkerbellKubernetes133UbuntuAddWorkerNodeGroupWithAPI: 2 +TestTinkerbellKubernetes132UbuntuAddWorkerNodeGroupWithAPI: 3 +TestTinkerbellKubernetes134UbuntuAddWorkerNodeGroupWithAPI: 3 +TestTinkerbellKubernetes133UbuntuAddWorkerNodeGroupWithAPI: 3 TestTinkerbellKubernetes129KubeletConfigurationSimpleFlow: 2 TestTinkerbellKubernetes130KubeletConfigurationSimpleFlow: 2 TestTinkerbellKubernetes132KubeletConfigurationSimpleFlow: 2 diff --git a/test/e2e/tinkerbell_test.go b/test/e2e/tinkerbell_test.go index c07b1fd8db1d..619f04af224d 100644 --- a/test/e2e/tinkerbell_test.go +++ b/test/e2e/tinkerbell_test.go @@ -233,6 +233,7 @@ func TestTinkerbellKubernetes132UbuntuTo133UpgradeCPOnly(t *testing.T) { } func TestTinkerbellKubernetes131UbuntuTo132UpgradeCPOnly(t *testing.T) { + licenseToken := framework.GetLicenseToken() provider := framework.NewTinkerbell(t) kube131 := v1alpha1.Kube131 test := framework.NewClusterE2ETest( @@ -247,6 +248,9 @@ func TestTinkerbellKubernetes131UbuntuTo132UpgradeCPOnly(t *testing.T) { ).WithClusterConfig( provider.WithCPKubeVersionAndOS(kube131, framework.Ubuntu2004), provider.WithWorkerKubeVersionAndOS(kube131, framework.Ubuntu2004), + api.ClusterToConfigFiller( + api.WithLicenseToken(licenseToken), + ), ) runSimpleUpgradeFlowWorkerNodeVersionForBareMetal( test, @@ -256,6 +260,7 @@ func TestTinkerbellKubernetes131UbuntuTo132UpgradeCPOnly(t *testing.T) { } func TestTinkerbellKubernetes130UbuntuTo131UpgradeWorkerOnly(t *testing.T) { + licenseToken := framework.GetLicenseToken() provider := framework.NewTinkerbell(t) kube130 := v1alpha1.Kube130 kube131 := v1alpha1.Kube131 @@ -272,6 +277,9 @@ func TestTinkerbellKubernetes130UbuntuTo131UpgradeWorkerOnly(t *testing.T) { ).WithClusterConfig( provider.WithCPKubeVersionAndOS(v1alpha1.Kube131, framework.Ubuntu2004), provider.WithWorkerKubeVersionAndOS(v1alpha1.Kube130, framework.Ubuntu2004), + api.ClusterToConfigFiller( + api.WithLicenseToken(licenseToken), + ), ) runSimpleUpgradeFlowWorkerNodeVersionForBareMetal( test, diff --git a/test/e2e/upgrade.go b/test/e2e/upgrade.go index 30288d2e6b91..10abe7ba46c4 100644 --- a/test/e2e/upgrade.go +++ b/test/e2e/upgrade.go @@ -134,6 +134,12 @@ func runUpgradeFlowForBareMetalWithAPI(test *framework.ClusterE2ETest, fillers . test.GenerateHardwareConfig() test.CreateCluster(framework.WithControlPlaneWaitTimeout("20m")) test.LoadClusterConfigGeneratedByCLI() + // The CLI-generated config file is written before the bootstrap cluster pivot, + // so it still contains the tinkerbell-bootstrap-ip annotation. This annotation + // causes the controller to use the bootstrap IP when regenerating machine templates, + // creating a diff with the existing templates (which were updated during pivot to + // use the tinkerbellIP). Clear it so the kubectl apply doesn't re-add it. + test.ClusterConfig.Cluster.ClearTinkerbellIPAnnotation() test.UpdateClusterConfig(fillers...) test.ApplyClusterManifest() test.ValidateClusterState()