diff --git a/test/e2e/aks_byo_node.go b/test/e2e/aks_byo_node.go index ae3e4ea95c0..78ccbf30b7c 100644 --- a/test/e2e/aks_byo_node.go +++ b/test/e2e/aks_byo_node.go @@ -22,6 +22,7 @@ package e2e import ( "context" "os" + "strings" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -64,6 +65,15 @@ func AKSBYONodeSpec(ctx context.Context, inputGetter func() AKSBYONodeSpecInput) Location: infraControlPlane.Spec.Location, Template: infrav1exp.AzureMachinePoolMachineTemplate{ VMSize: os.Getenv("AZURE_NODE_MACHINE_TYPE"), + Image: &infrav1.Image{ + // The old Marketplace images don't have newer Kubernetes versions that this test + // requires. Use the new Community Gallery instead. + ComputeGallery: &infrav1.AzureComputeGalleryImage{ + Gallery: "ClusterAPI-f72ceb4f-5159-4c26-a0fe-2ea738f0d019", + Name: "capi-ubun2-2404", + Version: strings.TrimPrefix(input.KubernetesVersion, "v"), + }, + }, }, }, } diff --git a/test/e2e/azure_test.go b/test/e2e/azure_test.go index 4496c5ee062..a5e92fec8be 100644 --- a/test/e2e/azure_test.go +++ b/test/e2e/azure_test.go @@ -853,17 +853,16 @@ var _ = Describe("Workload cluster creation", func() { }) }) - // TODO: restore when new CAPZ reference images are published - // By("creating a byo nodepool", func() { - // AKSBYONodeSpec(ctx, func() AKSBYONodeSpecInput { - // return AKSBYONodeSpecInput{ - // Cluster: result.Cluster, - // KubernetesVersion: kubernetesVersion, - // WaitIntervals: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), - // ExpectedWorkerNodes: result.ExpectedWorkerNodes(), - // } - // }) - // }) + By("creating a byo nodepool", func() { + AKSBYONodeSpec(ctx, func() AKSBYONodeSpecInput { + return AKSBYONodeSpecInput{ + Cluster: result.Cluster, + KubernetesVersion: kubernetesVersion, + WaitIntervals: e2eConfig.GetIntervals(specName, "wait-worker-nodes"), + ExpectedWorkerNodes: result.ExpectedWorkerNodes(), + } + }) + }) By("modifying custom patches", func() { AKSPatchSpec(ctx, func() AKSPatchSpecInput {