Skip to content

Commit 67ed536

Browse files
fix(e2e): Clear stale bootstrap IP annotation in bare metal API upgrade flow (#10652)
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. Co-authored-by: Rahul Ganesh <rahulbabu95@gmail.com>
1 parent c970db4 commit 67ed536

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/e2e/upgrade.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ func runUpgradeFlowForBareMetalWithAPI(test *framework.ClusterE2ETest, fillers .
134134
test.GenerateHardwareConfig()
135135
test.CreateCluster(framework.WithControlPlaneWaitTimeout("20m"))
136136
test.LoadClusterConfigGeneratedByCLI()
137+
// The CLI-generated config file is written before the bootstrap cluster pivot,
138+
// so it still contains the tinkerbell-bootstrap-ip annotation. This annotation
139+
// causes the controller to use the bootstrap IP when regenerating machine templates,
140+
// creating a diff with the existing templates (which were updated during pivot to
141+
// use the tinkerbellIP). Clear it so the kubectl apply doesn't re-add it.
142+
test.ClusterConfig.Cluster.ClearTinkerbellIPAnnotation()
137143
test.UpdateClusterConfig(fillers...)
138144
test.ApplyClusterManifest()
139145
test.ValidateClusterState()

0 commit comments

Comments
 (0)