@@ -329,7 +329,7 @@ var _ = Describe("Workload cluster creation", func() {
329329 })
330330
331331 Context ("Cordon and draining a node" , func () {
332- AzureMachinePoolDrainSpec (ctx , func () AzureMachinePoolDrainSpecInput {
332+ AzureMachinePoolDrainSpec (ctx , func () AzureMachinePoolDrainSpecInput {
333333 return AzureMachinePoolDrainSpecInput {
334334 BootstrapClusterProxy : bootstrapClusterProxy ,
335335 Namespace : namespace ,
@@ -430,85 +430,8 @@ var _ = Describe("Workload cluster creation", func() {
430430 })
431431 })
432432
433- Context ("Creating a cluster using a different SP identity" , func () {
434- BeforeEach (func () {
435- spClientSecret := os .Getenv ("AZURE_MULTI_TENANCY_SECRET" )
436- secret := & corev1.Secret {
437- ObjectMeta : metav1.ObjectMeta {
438- Name : "sp-identity-secret" ,
439- Namespace : namespace .Name ,
440- },
441- Type : corev1 .SecretTypeOpaque ,
442- Data : map [string ][]byte {"clientSecret" : []byte (spClientSecret )},
443- }
444- err := bootstrapClusterProxy .GetClient ().Create (ctx , secret )
445- Expect (err ).ToNot (HaveOccurred ())
446- })
447-
448- It ("with a single control plane node and 1 node" , func () {
449- spClientID := os .Getenv ("AZURE_MULTI_TENANCY_ID" )
450- identityName := e2eConfig .GetVariable (MultiTenancyIdentityName )
451- os .Setenv ("CLUSTER_IDENTITY_NAME" , identityName )
452- os .Setenv ("CLUSTER_IDENTITY_NAMESPACE" , namespace .Name )
453- os .Setenv ("AZURE_CLUSTER_IDENTITY_CLIENT_ID" , spClientID )
454- os .Setenv ("AZURE_CLUSTER_IDENTITY_SECRET_NAME" , "sp-identity-secret" )
455- os .Setenv ("AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE" , namespace .Name )
456-
457- clusterctl .ApplyClusterTemplateAndWait (ctx , clusterctl.ApplyClusterTemplateAndWaitInput {
458- ClusterProxy : bootstrapClusterProxy ,
459- ConfigCluster : clusterctl.ConfigClusterInput {
460- LogFolder : filepath .Join (artifactFolder , "clusters" , bootstrapClusterProxy .GetName ()),
461- ClusterctlConfigPath : clusterctlConfigPath ,
462- KubeconfigPath : bootstrapClusterProxy .GetKubeconfigPath (),
463- InfrastructureProvider : clusterctl .DefaultInfrastructureProvider ,
464- Flavor : "multi-tenancy" ,
465- Namespace : namespace .Name ,
466- ClusterName : clusterName ,
467- KubernetesVersion : e2eConfig .GetVariable (capi_e2e .KubernetesVersion ),
468- ControlPlaneMachineCount : pointer .Int64Ptr (1 ),
469- WorkerMachineCount : pointer .Int64Ptr (1 ),
470- },
471- WaitForClusterIntervals : e2eConfig .GetIntervals (specName , "wait-cluster" ),
472- WaitForControlPlaneIntervals : e2eConfig .GetIntervals (specName , "wait-control-plane" ),
473- WaitForMachineDeployments : e2eConfig .GetIntervals (specName , "wait-worker-nodes" ),
474- }, result )
475-
476- Context ("Validating identity" , func () {
477- AzureServicePrincipalIdentitySpec (ctx , func () AzureServicePrincipalIdentitySpecInput {
478- return AzureServicePrincipalIdentitySpecInput {
479- BootstrapClusterProxy : bootstrapClusterProxy ,
480- Namespace : namespace ,
481- ClusterName : clusterName ,
482- }
483- })
484- })
485- })
486- })
487-
488433 Context ("Creating an AKS cluster using a different SP identity" , func () {
489- BeforeEach (func () {
490- spClientSecret := os .Getenv ("AZURE_MULTI_TENANCY_SECRET" )
491- secret := & corev1.Secret {
492- ObjectMeta : metav1.ObjectMeta {
493- Name : "sp-identity-secret" ,
494- Namespace : namespace .Name ,
495- },
496- Type : corev1 .SecretTypeOpaque ,
497- Data : map [string ][]byte {"clientSecret" : []byte (spClientSecret )},
498- }
499- err := bootstrapClusterProxy .GetClient ().Create (ctx , secret )
500- Expect (err ).ToNot (HaveOccurred ())
501- })
502-
503434 It ("with a single control plane node and 1 node" , func () {
504- spClientID := os .Getenv ("AZURE_MULTI_TENANCY_ID" )
505- identityName := e2eConfig .GetVariable (MultiTenancyIdentityName )
506- os .Setenv ("CLUSTER_IDENTITY_NAME" , identityName )
507- os .Setenv ("CLUSTER_IDENTITY_NAMESPACE" , namespace .Name )
508- os .Setenv ("AZURE_CLUSTER_IDENTITY_CLIENT_ID" , spClientID )
509- os .Setenv ("AZURE_CLUSTER_IDENTITY_SECRET_NAME" , "sp-identity-secret" )
510- os .Setenv ("AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE" , namespace .Name )
511-
512435 kubernetesVersion , err := GetAKSKubernetesVersion (ctx , e2eConfig )
513436 Expect (err ).To (BeNil ())
514437
0 commit comments