@@ -286,6 +286,64 @@ var _ = Describe("[AWS] [EKS] Create and delete CAPI cluster functionality shoul
286286 })
287287})
288288
289+ var _ = FDescribe ("[AWS] [EKS] Create and delete CAPI cluster from cluster class" , Label (e2e .FullTestLabel ), func () {
290+ var topologyNamespace string
291+
292+ BeforeEach (func () {
293+ komega .SetClient (bootstrapClusterProxy .GetClient ())
294+ komega .SetContext (ctx )
295+
296+ topologyNamespace = "creategitops-aws-eks"
297+ })
298+
299+ specs .CreateMgmtV3UsingGitOpsSpec (ctx , func () specs.CreateMgmtV3UsingGitOpsSpecInput {
300+ testenv .CAPIOperatorDeployProvider (ctx , testenv.CAPIOperatorDeployProviderInput {
301+ BootstrapClusterProxy : bootstrapClusterProxy ,
302+ CAPIProvidersSecretsYAML : [][]byte {
303+ e2e .AWSIdentitySecret ,
304+ },
305+ CAPIProvidersYAML : [][]byte {
306+ e2e .AWSProvider ,
307+ },
308+ WaitForDeployments : []testenv.NamespaceName {
309+ {
310+ Name : "capa-controller-manager" ,
311+ Namespace : "capa-system" ,
312+ },
313+ },
314+ })
315+
316+ return specs.CreateMgmtV3UsingGitOpsSpecInput {
317+ E2EConfig : e2e .LoadE2EConfig (),
318+ BootstrapClusterProxy : bootstrapClusterProxy ,
319+ ClusterTemplate : e2e .CAPIAwsEKSTopology ,
320+ ClusterName : "cluster-eks" ,
321+ ControlPlaneMachineCount : ptr .To (1 ),
322+ WorkerMachineCount : ptr .To (1 ),
323+ LabelNamespace : true ,
324+ RancherServerURL : hostName ,
325+ CAPIClusterCreateWaitName : "wait-capa-create-cluster" ,
326+ DeleteClusterWaitName : "wait-eks-delete" ,
327+ CapiClusterOwnerLabel : e2e .CapiClusterOwnerLabel ,
328+ CapiClusterOwnerNamespaceLabel : e2e .CapiClusterOwnerNamespaceLabel ,
329+ OwnedLabelName : e2e .OwnedLabelName ,
330+ TopologyNamespace : topologyNamespace ,
331+ AdditionalTemplateVariables : map [string ]string {
332+ e2e .KubernetesVersionVar : e2e .LoadE2EConfig ().GetVariableOrEmpty (e2e .AWSKubernetesVersionVar ), // override the default k8s version
333+ },
334+ AdditionalFleetGitRepos : []turtlesframework.FleetCreateGitRepoInput {
335+ {
336+ Name : "aws-cluster-classes-eks" ,
337+ Paths : []string {"examples/clusterclasses/aws/eks" },
338+ ClusterProxy : bootstrapClusterProxy ,
339+ TargetNamespace : topologyNamespace ,
340+ Branch : "aws-eks-example" ,
341+ },
342+ },
343+ }
344+ })
345+ })
346+
289347var _ = Describe ("[AWS] [EC2 Kubeadm] Create and delete CAPI cluster functionality should work with namespace auto-import" , Label (e2e .FullTestLabel , e2e .KubeadmTestLabel ), func () {
290348 var topologyNamespace string
291349
0 commit comments