Skip to content

Commit

Permalink
deploy apiserver ilb cluster in the e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
nawazkh committed Dec 5, 2024
1 parent 32e5ccd commit 405f9a6
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions test/e2e/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1156,14 +1156,39 @@ 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() {
It("with one controlplane node and three worker nodes", func() {
// TODO: create a workload cluster with API Server ILB feature gate enabled
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,
withAzureCNIv1Manifest(e2eConfig.GetVariable(AzureCNIv1Manifest)), // AzureCNIManifest is set
withFlavor("apiserver-ilb"),
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)
// TODO: deploy a sample deployment on the worker nodes
// TODO: verify the worker node's /etc/hosts has the updated DNS entry for the Internal LB for the API Server
// AZURE_INTERNAL_LB_PRIVATE_IP = 40.0.0.100
// AZURE_VNET_CIDR = 40.0.0.0/8
// AZURE_CP_SUBNET_CIDR = 40.0.0.0/16
// AZURE_NODE_SUBNET_CIDR = 40.1.0.0/16

})
})

Expand Down

0 comments on commit 405f9a6

Please sign in to comment.