@@ -822,8 +822,8 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
822
822
})
823
823
})
824
824
825
- ginkgo .Describe ("Peerings and internal ELB" , func () {
826
- ginkgo .It ("should create external clusters in peered VPC and with an internal ELB" , func () {
825
+ ginkgo .Describe ("Peerings, internal ELB and private subnet " , func () {
826
+ ginkgo .It ("should create external clusters in peered VPC and with an internal ELB and only utilize a private subnet " , func () {
827
827
specName := "functional-test-peered-internal-elb"
828
828
requiredResources = & shared.TestResource {EC2Normal : 2 * e2eCtx .Settings .InstanceVCPU , IGW : 2 , NGW : 2 , VPC : 2 , ClassicLB : 2 , EIP : 5 }
829
829
requiredResources .WriteRequestedResources (e2eCtx , specName )
@@ -874,7 +874,6 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
874
874
shared .SetEnvVar ("WL_VPC_ID" , * wlClusterInfra .VPC .VpcId , false )
875
875
shared .SetEnvVar ("MGMT_PUBLIC_SUBNET_ID" , * mgmtClusterInfra .State .PublicSubnetID , false )
876
876
shared .SetEnvVar ("MGMT_PRIVATE_SUBNET_ID" , * mgmtClusterInfra .State .PrivateSubnetID , false )
877
- shared .SetEnvVar ("WL_PUBLIC_SUBNET_ID" , * wlClusterInfra .State .PublicSubnetID , false )
878
877
shared .SetEnvVar ("WL_PRIVATE_SUBNET_ID" , * wlClusterInfra .State .PrivateSubnetID , false )
879
878
880
879
ginkgo .By ("Creating VPC peerings" )
@@ -996,49 +995,53 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
996
995
Expect (len (wlCPM )).To (Equal (1 ))
997
996
998
997
ginkgo .By ("Deleting the workload cluster" )
999
- framework .DeleteCluster (ctx , framework.DeleteClusterInput {
1000
- Deleter : mgmtClusterProxy .GetClient (),
1001
- Cluster : wlResult .Cluster ,
1002
- })
1003
-
1004
- framework .WaitForClusterDeleted (ctx , framework.WaitForClusterDeletedInput {
1005
- Getter : mgmtClusterProxy .GetClient (),
1006
- Cluster : wlResult .Cluster ,
1007
- }, e2eCtx .E2EConfig .GetIntervals ("" , "wait-delete-cluster" )... )
998
+ shared .DumpSpecResourcesFromProxy (ctx , e2eCtx , wlNamespace , mgmtClusterProxy )
999
+ shared .DumpMachinesFromProxy (ctx , e2eCtx , wlNamespace , mgmtClusterProxy )
1000
+ if ! e2eCtx .Settings .SkipCleanup {
1001
+ framework .DeleteCluster (ctx , framework.DeleteClusterInput {
1002
+ Deleter : mgmtClusterProxy .GetClient (),
1003
+ Cluster : wlResult .Cluster ,
1004
+ })
1008
1005
1009
- ginkgo .By ("Moving the management cluster back to bootstrap" )
1010
- clusterctl .Move (ctx , clusterctl.MoveInput {
1011
- LogFolder : filepath .Join (e2eCtx .Settings .ArtifactFolder , "clusters" , mgmtCluster .Name ),
1012
- ClusterctlConfigPath : e2eCtx .Environment .ClusterctlConfigPath ,
1013
- FromKubeconfigPath : mgmtClusterProxy .GetKubeconfigPath (),
1014
- ToKubeconfigPath : e2eCtx .Environment .BootstrapClusterProxy .GetKubeconfigPath (),
1015
- Namespace : namespace .Name ,
1016
- })
1006
+ framework .WaitForClusterDeleted (ctx , framework.WaitForClusterDeletedInput {
1007
+ Getter : mgmtClusterProxy .GetClient (),
1008
+ Cluster : wlResult .Cluster ,
1009
+ }, e2eCtx .E2EConfig .GetIntervals ("" , "wait-delete-cluster" )... )
1010
+
1011
+ ginkgo .By ("Moving the management cluster back to bootstrap" )
1012
+ clusterctl .Move (ctx , clusterctl.MoveInput {
1013
+ LogFolder : filepath .Join (e2eCtx .Settings .ArtifactFolder , "clusters" , mgmtCluster .Name ),
1014
+ ClusterctlConfigPath : e2eCtx .Environment .ClusterctlConfigPath ,
1015
+ FromKubeconfigPath : mgmtClusterProxy .GetKubeconfigPath (),
1016
+ ToKubeconfigPath : e2eCtx .Environment .BootstrapClusterProxy .GetKubeconfigPath (),
1017
+ Namespace : namespace .Name ,
1018
+ })
1017
1019
1018
- mgmtCluster = framework .DiscoveryAndWaitForCluster (ctx , framework.DiscoveryAndWaitForClusterInput {
1019
- Getter : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1020
- Namespace : mgmtNamespace .Name ,
1021
- Name : mgmtCluster .Name ,
1022
- }, e2eCtx .E2EConfig .GetIntervals (specName , "wait-cluster" )... )
1020
+ mgmtCluster = framework .DiscoveryAndWaitForCluster (ctx , framework.DiscoveryAndWaitForClusterInput {
1021
+ Getter : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1022
+ Namespace : mgmtNamespace .Name ,
1023
+ Name : mgmtCluster .Name ,
1024
+ }, e2eCtx .E2EConfig .GetIntervals (specName , "wait-cluster" )... )
1023
1025
1024
- mgmtControlPlane = framework .GetKubeadmControlPlaneByCluster (ctx , framework.GetKubeadmControlPlaneByClusterInput {
1025
- Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1026
- ClusterName : mgmtCluster .Name ,
1027
- Namespace : mgmtCluster .Namespace ,
1028
- })
1029
- Expect (mgmtControlPlane ).ToNot (BeNil ())
1026
+ mgmtControlPlane = framework .GetKubeadmControlPlaneByCluster (ctx , framework.GetKubeadmControlPlaneByClusterInput {
1027
+ Lister : e2eCtx .Environment .BootstrapClusterProxy .GetClient (),
1028
+ ClusterName : mgmtCluster .Name ,
1029
+ Namespace : mgmtCluster .Namespace ,
1030
+ })
1031
+ Expect (mgmtControlPlane ).ToNot (BeNil ())
1030
1032
1031
- ginkgo .By ("Deleting the management cluster" )
1032
- deleteCluster (ctx , mgmtCluster )
1033
+ ginkgo .By ("Deleting the management cluster" )
1034
+ deleteCluster (ctx , mgmtCluster )
1033
1035
1034
- ginkgo .By ("Deleting peering connection" )
1035
- Expect (shared .DeletePeering (e2eCtx , * cPeering .VpcPeeringConnectionId )).To (BeTrue ())
1036
+ ginkgo .By ("Deleting peering connection" )
1037
+ Expect (shared .DeletePeering (e2eCtx , * cPeering .VpcPeeringConnectionId )).To (BeTrue ())
1036
1038
1037
- ginkgo .By ("Deleting the workload cluster infrastructure" )
1038
- wlClusterInfra .DeleteInfrastructure ()
1039
+ ginkgo .By ("Deleting the workload cluster infrastructure" )
1040
+ wlClusterInfra .DeleteInfrastructure ()
1039
1041
1040
- ginkgo .By ("Deleting the management cluster infrastructure" )
1041
- mgmtClusterInfra .DeleteInfrastructure ()
1042
+ ginkgo .By ("Deleting the management cluster infrastructure" )
1043
+ mgmtClusterInfra .DeleteInfrastructure ()
1044
+ }
1042
1045
})
1043
1046
})
1044
1047
})
0 commit comments