From b4eb1280faf2e252ef1b8ccfb31daaf2941ec96b Mon Sep 17 00:00:00 2001 From: Rahul Ganesh Date: Thu, 26 Feb 2026 19:03:54 -0800 Subject: [PATCH] fix(e2e): Clear stale bootstrap IP annotation in bare metal API upgrade flow The CLI-generated config file is written before the bootstrap-to-management cluster pivot, so it retains the tinkerbell-bootstrap-ip annotation. When the test re-applies this config via kubectl apply, the annotation gets re-added to the Cluster CR, causing the controller to regenerate machine templates with the bootstrap IP instead of the tinkerbellIP. This creates a template diff that triggers unintended rollouts, blocking reconciliation. --- test/e2e/upgrade.go | 6 ++++++ 1 file changed, 6 insertions(+) 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()