Skip to content

Commit 0309537

Browse files
authored
Merge pull request #5230 from nojnhuh/aks-byo-node
[release-1.17] re-enable AKS BYO node test
2 parents 32cd4c7 + 3d5c740 commit 0309537

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

test/e2e/aks_byo_node.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package e2e
2222
import (
2323
"context"
2424
"os"
25+
"strings"
2526

2627
. "github.com/onsi/ginkgo/v2"
2728
. "github.com/onsi/gomega"
@@ -64,6 +65,15 @@ func AKSBYONodeSpec(ctx context.Context, inputGetter func() AKSBYONodeSpecInput)
6465
Location: infraControlPlane.Spec.Location,
6566
Template: infrav1exp.AzureMachinePoolMachineTemplate{
6667
VMSize: os.Getenv("AZURE_NODE_MACHINE_TYPE"),
68+
Image: &infrav1.Image{
69+
// The old Marketplace images don't have newer Kubernetes versions that this test
70+
// requires. Use the new Community Gallery instead.
71+
ComputeGallery: &infrav1.AzureComputeGalleryImage{
72+
Gallery: "ClusterAPI-f72ceb4f-5159-4c26-a0fe-2ea738f0d019",
73+
Name: "capi-ubun2-2404",
74+
Version: strings.TrimPrefix(input.KubernetesVersion, "v"),
75+
},
76+
},
6777
},
6878
},
6979
}

test/e2e/azure_test.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -853,17 +853,16 @@ var _ = Describe("Workload cluster creation", func() {
853853
})
854854
})
855855

856-
// TODO: restore when new CAPZ reference images are published
857-
// By("creating a byo nodepool", func() {
858-
// AKSBYONodeSpec(ctx, func() AKSBYONodeSpecInput {
859-
// return AKSBYONodeSpecInput{
860-
// Cluster: result.Cluster,
861-
// KubernetesVersion: kubernetesVersion,
862-
// WaitIntervals: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
863-
// ExpectedWorkerNodes: result.ExpectedWorkerNodes(),
864-
// }
865-
// })
866-
// })
856+
By("creating a byo nodepool", func() {
857+
AKSBYONodeSpec(ctx, func() AKSBYONodeSpecInput {
858+
return AKSBYONodeSpecInput{
859+
Cluster: result.Cluster,
860+
KubernetesVersion: kubernetesVersion,
861+
WaitIntervals: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
862+
ExpectedWorkerNodes: result.ExpectedWorkerNodes(),
863+
}
864+
})
865+
})
867866

868867
By("modifying custom patches", func() {
869868
AKSPatchSpec(ctx, func() AKSPatchSpecInput {

0 commit comments

Comments
 (0)