@@ -206,4 +206,50 @@ var _ = Describe("Workload cluster creation", func() {
206
206
}, result )
207
207
})
208
208
})
209
+
210
+ Context ("Creating a single Flatcar control-plane cluster" , func () {
211
+ It ("Should create a cluster with 1 Flatcar worker node and can be scaled" , func () {
212
+ By ("Initializes with 1 Flatcar worker node" )
213
+ clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
214
+ ClusterProxy : bootstrapClusterProxy ,
215
+ ConfigCluster : clusterctl.ConfigClusterInput {
216
+ LogFolder : clusterctlLogFolder ,
217
+ ClusterctlConfigPath : clusterctlConfigPath ,
218
+ KubeconfigPath : bootstrapClusterProxy .GetKubeconfigPath (),
219
+ InfrastructureProvider : clusterctl .DefaultInfrastructureProvider ,
220
+ Flavor : "flatcar" ,
221
+ Namespace : namespace .Name ,
222
+ ClusterName : clusterName ,
223
+ KubernetesVersion : e2eConfig .GetVariable (KubernetesVersion ),
224
+ ControlPlaneMachineCount : ptr.To [int64 ](1 ),
225
+ WorkerMachineCount : ptr.To [int64 ](1 ),
226
+ ClusterctlVariables : map [string ]string {"IMAGE_ID" : e2eConfig .GetVariable (FlatcarImageID )},
227
+ },
228
+ WaitForClusterIntervals : e2eConfig .GetIntervals (specName , "wait-cluster" ),
229
+ WaitForControlPlaneIntervals : e2eConfig .GetIntervals (specName , "wait-control-plane" ),
230
+ WaitForMachineDeployments : e2eConfig .GetIntervals (specName , "wait-worker-nodes" ),
231
+ }, result )
232
+
233
+ By ("Scaling Flatcar worker node to 3" )
234
+ clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
235
+ ClusterProxy : bootstrapClusterProxy ,
236
+ ConfigCluster : clusterctl.ConfigClusterInput {
237
+ LogFolder : clusterctlLogFolder ,
238
+ ClusterctlConfigPath : clusterctlConfigPath ,
239
+ KubeconfigPath : bootstrapClusterProxy .GetKubeconfigPath (),
240
+ InfrastructureProvider : clusterctl .DefaultInfrastructureProvider ,
241
+ Flavor : "flatcar" ,
242
+ Namespace : namespace .Name ,
243
+ ClusterName : clusterName ,
244
+ KubernetesVersion : e2eConfig .GetVariable (KubernetesVersion ),
245
+ ControlPlaneMachineCount : ptr.To [int64 ](1 ),
246
+ WorkerMachineCount : ptr.To [int64 ](3 ),
247
+ ClusterctlVariables : map [string ]string {"IMAGE_ID" : e2eConfig .GetVariable (FlatcarImageID )},
248
+ },
249
+ WaitForClusterIntervals : e2eConfig .GetIntervals (specName , "wait-cluster" ),
250
+ WaitForControlPlaneIntervals : e2eConfig .GetIntervals (specName , "wait-control-plane" ),
251
+ WaitForMachineDeployments : e2eConfig .GetIntervals (specName , "wait-worker-nodes" ),
252
+ }, result )
253
+ })
254
+ })
209
255
})
0 commit comments