Skip to content

Commit a37ab02

Browse files
bryan-coxclaude
andcommitted
test: Add apiserver-ilb-zones flavor for zone-redundant LB E2E test
Create a new cluster template flavor that extends apiserver-ilb and adds availabilityZones configuration to all load balancers (APIServerLB, NodeOutboundLB, ControlPlaneOutboundLB). This fixes the optional E2E test for zone-redundant load balancers by using a dedicated template with zones pre-configured instead of relying on an unused environment variable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9ca4c6c commit a37ab02

File tree

4 files changed

+268
-3
lines changed

4 files changed

+268
-3
lines changed

templates/cluster-template-apiserver-ilb-zones.yaml

Lines changed: 235 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: default
4+
resources:
5+
- ../apiserver-ilb
6+
7+
patches:
8+
- path: patches/lb-zones.yaml
9+
10+
sortOptions:
11+
order: fifo
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
2+
kind: AzureCluster
3+
metadata:
4+
name: ${CLUSTER_NAME}
5+
spec:
6+
networkSpec:
7+
apiServerLB:
8+
availabilityZones:
9+
- "1"
10+
- "2"
11+
- "3"
12+
nodeOutboundLB:
13+
availabilityZones:
14+
- "1"
15+
- "2"
16+
- "3"
17+
controlPlaneOutboundLB:
18+
availabilityZones:
19+
- "1"
20+
- "2"
21+
- "3"

test/e2e/azure_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,11 +1441,9 @@ var _ = Describe("Workload cluster creation", func() {
14411441
Expect(os.Setenv("AZURE_VNET_CIDR", "40.0.0.0/8")).To(Succeed())
14421442
Expect(os.Setenv("AZURE_CP_SUBNET_CIDR", "40.0.0.0/16")).To(Succeed())
14431443
Expect(os.Setenv("AZURE_NODE_SUBNET_CIDR", "40.1.0.0/16")).To(Succeed())
1444-
Expect(os.Setenv("AZURE_LB_ZONES", "1,2,3")).To(Succeed())
1445-
14461444
clusterctl.ApplyClusterTemplateAndWait(ctx, createApplyClusterTemplateInput(
14471445
specName,
1448-
withFlavor("apiserver-ilb"),
1446+
withFlavor("apiserver-ilb-zones"),
14491447
withNamespace(namespace.Name),
14501448
withClusterName(clusterName),
14511449
withControlPlaneMachineCount(3),

0 commit comments

Comments
 (0)