Skip to content

Commit 735edd3

Browse files
authored
make internal cluster domain optional during e2e runs (#702)
1 parent 436fe23 commit 735edd3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/e2e/test_environment.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var (
2424
kubernetesClient, stacksetClient, routegroupClient = createClients()
2525
namespace = requiredEnvar("E2E_NAMESPACE")
2626
clusterDomain = requiredEnvar("CLUSTER_DOMAIN")
27-
clusterDomainInternal = requiredEnvar("CLUSTER_DOMAIN_INTERNAL")
28-
clusterDomains = []string{clusterDomain, clusterDomainInternal}
27+
clusterDomainInternal = os.Getenv("CLUSTER_DOMAIN_INTERNAL")
28+
clusterDomains = []string{clusterDomain}
2929
controllerId = os.Getenv("CONTROLLER_ID")
3030
waitTimeout time.Duration
3131
trafficSwitchWaitTimeout time.Duration
@@ -35,6 +35,10 @@ func init() {
3535
flag.DurationVar(&waitTimeout, "wait-timeout", 60*time.Second, "Waiting interval before getting the resource")
3636
flag.DurationVar(&trafficSwitchWaitTimeout, "traffic-switch-wait-timeout", 150*time.Second, "Waiting interval before getting the checking stackset new traffic")
3737
logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true})
38+
39+
if clusterDomainInternal != "" {
40+
clusterDomains = append(clusterDomains, clusterDomainInternal)
41+
}
3842
}
3943

4044
func createClients() (kubernetes.Interface, clientset.Interface, rg.Interface) {

0 commit comments

Comments
 (0)