Skip to content

Commit 5e170ad

Browse files
committed
add test case for 3 control plane nodes and ilb
1 parent 016a67e commit 5e170ad

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/e2e/e2e_test.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,36 @@ var _ = Describe("Workload cluster creation", func() {
260260
})
261261
})
262262

263+
Context("Creating a control-plane cluster with three control plane nodes and an internal load balancer", func() {
264+
It("Should create a cluster with 3 control-plane and 1 worker node with an internal load balancer", func() {
265+
// This test requires a GKE bootstrap cluster.
266+
if bootstrapGKEClusterProxy == nil {
267+
Skip("test requires a GKE bootstrap cluster, GKE_BOOTSTRAP_KUBECONFIG is not set")
268+
}
269+
270+
clusterName := fmt.Sprintf("%s-internal-lb", clusterNamePrefix)
271+
By("Creating a cluster with internal load balancer from GKE bootstrap cluster")
272+
clusterctl.ApplyClusterTemplateAndWait(ctx, clusterctl.ApplyClusterTemplateAndWaitInput{
273+
ClusterProxy: bootstrapGKEClusterProxy,
274+
ConfigCluster: clusterctl.ConfigClusterInput{
275+
LogFolder: gkeClusterctlLogFolder,
276+
ClusterctlConfigPath: clusterctlConfigPath,
277+
KubeconfigPath: bootstrapGKEClusterProxy.GetKubeconfigPath(),
278+
InfrastructureProvider: clusterctl.DefaultInfrastructureProvider,
279+
Flavor: "ci-with-internal-lb",
280+
Namespace: gkeNamespace.Name,
281+
ClusterName: clusterName,
282+
KubernetesVersion: e2eConfig.MustGetVariable(KubernetesVersion),
283+
ControlPlaneMachineCount: ptr.To[int64](3),
284+
WorkerMachineCount: ptr.To[int64](1),
285+
},
286+
WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"),
287+
WaitForControlPlaneIntervals: e2eConfig.GetIntervals(specName, "wait-control-plane"),
288+
WaitForMachineDeployments: e2eConfig.GetIntervals(specName, "wait-worker-nodes"),
289+
}, result)
290+
})
291+
})
292+
263293
Context("Creating a cluster using a cluster class", func() {
264294
It("Should create a cluster class and then a cluster based on it", func() {
265295
clusterName := fmt.Sprintf("%s-topology", clusterNamePrefix)

0 commit comments

Comments
 (0)