You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(controllers): add watches to resolve AWSMachineTemplate e2e race condition
Add MachineDeployment and KubeadmControlPlane watchers to trigger
AWSMachineTemplate reconciliation, ensuring nodeInfo is populated
before cache sync completes.
Related: #5711
ginkgo.By(fmt.Sprintf("AWSMachineTemplate %s has capacity populated: %v", template.Name, template.Status.Capacity))
367
+
Expect(template.Status.Capacity).To(HaveKey(corev1.ResourceCPU), "Expected CPU to be set in capacity")
368
+
Expect(template.Status.Capacity).To(HaveKey(corev1.ResourceMemory), "Expected Memory to be set in capacity")
369
+
returntrue
370
+
}
371
371
}
372
-
iftemplate.Status.NodeInfo!=nil {
373
-
foundTemplateWithNodeInfo=true
374
-
ginkgo.By(fmt.Sprintf("AWSMachineTemplate %s has nodeInfo populated: %v", template.Name, template.Status.NodeInfo))
375
-
// Verify architecture is set (should be either amd64 or arm64 for AWS)
376
-
Expect(template.Status.NodeInfo.Architecture).ToNot(BeEmpty(), "Expected architecture to be set in nodeInfo")
377
-
Expect(string(template.Status.NodeInfo.Architecture)).To(MatchRegexp("^(amd64|arm64)$"), "Expected architecture to be amd64 or arm64")
378
-
// Verify operating system is set
379
-
Expect(template.Status.NodeInfo.OperatingSystem).ToNot(BeEmpty(), "Expected operatingSystem to be set in nodeInfo")
372
+
returnfalse
373
+
}, e2eCtx.E2EConfig.GetIntervals(specName, "wait-deployment")...).Should(BeTrue(), "Expected at least one AWSMachineTemplate to have capacity populated")
374
+
375
+
ginkgo.By("Verifying AWSMachineTemplate nodeInfo is populated")
ginkgo.By(fmt.Sprintf("AWSMachineTemplate %s has nodeInfo populated: %v", template.Name, template.Status.NodeInfo))
385
+
// Verify architecture is set (should be either amd64 or arm64 for AWS)
386
+
Expect(template.Status.NodeInfo.Architecture).ToNot(BeEmpty(), "Expected architecture to be set in nodeInfo")
387
+
Expect(string(template.Status.NodeInfo.Architecture)).To(MatchRegexp("^(amd64|arm64)$"), "Expected architecture to be amd64 or arm64")
388
+
// Verify operating system is set
389
+
Expect(template.Status.NodeInfo.OperatingSystem).ToNot(BeEmpty(), "Expected operatingSystem to be set in nodeInfo")
390
+
returntrue
391
+
}
380
392
}
381
-
}
382
-
Expect(foundTemplateWithCapacity).To(BeTrue(), "Expected at least one AWSMachineTemplate to have capacity populated")
383
-
Expect(foundTemplateWithNodeInfo).To(BeTrue(), "Expected at least one AWSMachineTemplate to have nodeInfo populated")
393
+
returnfalse
394
+
}, e2eCtx.E2EConfig.GetIntervals(specName, "wait-deployment")...).Should(BeTrue(), "Expected at least one AWSMachineTemplate to have nodeInfo populated")
0 commit comments