Skip to content

Commit

Permalink
add e2e test for a default flavored template
Browse files Browse the repository at this point in the history
  • Loading branch information
nawazkh committed Dec 12, 2024
1 parent 9f01586 commit ce8d4b7
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion test/e2e/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,56 @@ var _ = Describe("Workload cluster creation", func() {
})
})

Context("Creating a self-managed VM based cluster using API Server ILB feature gate [OPTIONAL][API-Server-ILB]", func() {
Context("Creating a self-managed VM based cluster using API Server ILB feature gate using default template [OPTIONAL][API-Server-ILB]", func() {
It("with three controlplane node and three worker nodes", func() {
clusterName = getClusterName(clusterNamePrefix, "apiserver-ilb")

// Set the environment variables required for the API Server ILB feature gate
Expect(os.Setenv("EXP_APISERVER_ILB", "true")).To(Succeed())
// Expect(os.Setenv("AZURE_INTERNAL_LB_PRIVATE_IP", "40.0.0.100")).To(Succeed())
// Expect(os.Setenv("AZURE_VNET_CIDR", "40.0.0.0/8")).To(Succeed())
// Expect(os.Setenv("AZURE_CP_SUBNET_CIDR", "40.0.0.0/16")).To(Succeed())
// Expect(os.Setenv("AZURE_NODE_SUBNET_CIDR", "40.1.0.0/16")).To(Succeed())

clusterctl.ApplyClusterTemplateAndWait(ctx, createApplyClusterTemplateInput(
specName,
withNamespace(namespace.Name),
withClusterName(clusterName),
withControlPlaneMachineCount(3),
withWorkerMachineCount(2),
withControlPlaneInterval(specName, "wait-control-plane-ha"),
withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{
WaitForControlPlaneInitialized: EnsureControlPlaneInitializedNoAddons,
}),
withPostMachinesProvisioned(func() {
EnsureDaemonsets(ctx, func() DaemonsetsSpecInput {
return DaemonsetsSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Namespace: namespace,
ClusterName: clusterName,
}
})
}),
), result)

By("Probing workload cluster with APIServerILB feature gate", func() {
AzureAPIServerILBSpec(ctx, func() AzureAPIServerILBSpecInput {
return AzureAPIServerILBSpecInput{
BootstrapClusterProxy: bootstrapClusterProxy,
Cluster: result.Cluster,
Namespace: namespace,
ClusterName: clusterName,
ExpectedWorkerNodes: result.ExpectedWorkerNodes(),
WaitIntervals: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
}
})
})

By("PASSED!")
})
})

Context("Creating a self-managed VM based cluster using API Server ILB feature gate and fully spec-ed out template [OPTIONAL][API-Server-ILB]", func() {
It("with three controlplane node and three worker nodes", func() {
clusterName = getClusterName(clusterNamePrefix, "apiserver-ilb")

Expand Down

0 comments on commit ce8d4b7

Please sign in to comment.