Skip to content

Commit 6d3ce75

Browse files
committed
add flag to configure dualstack lb
1 parent b5c8905 commit 6d3ce75

File tree

5 files changed

+137
-75
lines changed

5 files changed

+137
-75
lines changed

test/e2e/ingress/multi_path_backend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var _ = Describe("test ingresses with multiple path and backends", func() {
3636
// TODO, force cleanup all left K8s resources if any.
3737
})
3838

39-
Context("with podReadinessGate enabled", func() {
39+
Context("with podReadinessGate enabled, backend target type both instance and ip", func() {
4040
It("standalone Ingress should behaves correctly", func() {
4141
stack := NewMultiPathBackendStack(map[string]NamespacedResourcesConfig{
4242
"ns-1": {

test/e2e/ingress/vanilla_ingress_test.go

Lines changed: 94 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,17 @@ var _ = Describe("vanilla ingress tests", func() {
9090
Controller: "ingress.k8s.aws/alb",
9191
},
9292
}
93+
annotation := map[string]string{
94+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
95+
}
96+
if tf.Options.IPFamily == "IPv6" {
97+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
98+
annotation["alb.ingress.kubernetes.io/target-type"] = "ip"
99+
}
93100
ing := ingBuilder.
94101
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
95102
WithIngressClassName(ingClass.Name).
96-
WithAnnotations(map[string]string{
97-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
98-
}).Build(sandboxNS.Name, "ing")
103+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
99104
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ingClass, ing)
100105
resStack.Setup(ctx)
101106
defer resStack.TearDown(ctx)
@@ -121,12 +126,17 @@ var _ = Describe("vanilla ingress tests", func() {
121126
},
122127
},
123128
}
129+
annotation := map[string]string{
130+
"kubernetes.io/ingress.class": "alb",
131+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
132+
}
133+
if tf.Options.IPFamily == "IPv6" {
134+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
135+
annotation["alb.ingress.kubernetes.io/target-type"] = "ip"
136+
}
124137
ing := ingBuilder.
125138
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
126-
WithAnnotations(map[string]string{
127-
"kubernetes.io/ingress.class": "alb",
128-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
129-
}).Build(sandboxNS.Name, "ing")
139+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
130140
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ing)
131141
resStack.Setup(ctx)
132142
defer resStack.TearDown(ctx)
@@ -162,12 +172,16 @@ var _ = Describe("vanilla ingress tests", func() {
162172
Controller: "kubernetes.io/nginx",
163173
},
164174
}
175+
annotation := map[string]string{
176+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
177+
}
178+
if tf.Options.IPFamily == "IPv6" {
179+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
180+
}
165181
ing := ingBuilder.
166182
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
167183
WithIngressClassName(ingClass.Name).
168-
WithAnnotations(map[string]string{
169-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
170-
}).Build(sandboxNS.Name, "ing")
184+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
171185
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ingClass, ing)
172186
resStack.Setup(ctx)
173187
defer resStack.TearDown(ctx)
@@ -187,12 +201,16 @@ var _ = Describe("vanilla ingress tests", func() {
187201
},
188202
},
189203
}
204+
annotation := map[string]string{
205+
"kubernetes.io/ingress.class": "nginx",
206+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
207+
}
208+
if tf.Options.IPFamily == "IPv6" {
209+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
210+
}
190211
ing := ingBuilder.
191212
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
192-
WithAnnotations(map[string]string{
193-
"kubernetes.io/ingress.class": "nginx",
194-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
195-
}).Build(sandboxNS.Name, "ing")
213+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
196214
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ing)
197215
resStack.Setup(ctx)
198216
defer resStack.TearDown(ctx)
@@ -212,11 +230,15 @@ var _ = Describe("vanilla ingress tests", func() {
212230
},
213231
},
214232
}
233+
annotation := map[string]string{
234+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
235+
}
236+
if tf.Options.IPFamily == "IPv6" {
237+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
238+
}
215239
ing := ingBuilder.
216240
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
217-
WithAnnotations(map[string]string{
218-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
219-
}).Build(sandboxNS.Name, "ing")
241+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
220242
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ing)
221243
resStack.Setup(ctx)
222244
defer resStack.TearDown(ctx)
@@ -240,13 +262,18 @@ var _ = Describe("vanilla ingress tests", func() {
240262
}
241263
safeClusterName := strings.ReplaceAll(tf.Options.ClusterName, ".", "-")
242264
lbName := fmt.Sprintf("%.16s-%.15s", safeClusterName, sandboxNS.Name)
265+
annotation := map[string]string{
266+
"kubernetes.io/ingress.class": "alb",
267+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
268+
"alb.ingress.kubernetes.io/load-balancer-name": lbName,
269+
}
270+
if tf.Options.IPFamily == "IPv6" {
271+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
272+
annotation["alb.ingress.kubernetes.io/target-type"] = "ip"
273+
}
243274
ing := ingBuilder.
244275
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
245-
WithAnnotations(map[string]string{
246-
"kubernetes.io/ingress.class": "alb",
247-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
248-
"alb.ingress.kubernetes.io/load-balancer-name": lbName,
249-
}).Build(sandboxNS.Name, "ing")
276+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
250277
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ing)
251278
resStack.Setup(ctx)
252279
defer resStack.TearDown(ctx)
@@ -279,13 +306,17 @@ var _ = Describe("vanilla ingress tests", func() {
279306
},
280307
},
281308
}
309+
annotation := map[string]string{
310+
"kubernetes.io/ingress.class": "alb",
311+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
312+
"alb.ingress.kubernetes.io/target-type": "ip",
313+
}
314+
if tf.Options.IPFamily == "IPv6" {
315+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
316+
}
282317
ing := ingBuilder.
283318
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/path", PathType: &exact, Backend: ingBackend}).
284-
WithAnnotations(map[string]string{
285-
"kubernetes.io/ingress.class": "alb",
286-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
287-
"alb.ingress.kubernetes.io/target-type": "ip",
288-
}).Build(sandboxNS.Name, "ing")
319+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
289320
resStack := fixture.NewK8SResourceStack(tf, dp, svc, ing)
290321
resStack.Setup(ctx)
291322
defer resStack.TearDown(ctx)
@@ -339,19 +370,24 @@ var _ = Describe("vanilla ingress tests", func() {
339370
},
340371
},
341372
}
373+
annotation := map[string]string{
374+
"kubernetes.io/ingress.class": "alb",
375+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
376+
"alb.ingress.kubernetes.io/actions.response-503": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"503\",\"messageBody\":\"503 error text\"}}",
377+
"alb.ingress.kubernetes.io/actions.redirect-to-aws": "{\"type\":\"redirect\",\"redirectConfig\":{\"host\":\"aws.amazon.com\",\"path\":\"/eks/\",\"port\":\"443\",\"protocol\":\"HTTPS\",\"query\":\"k=v\",\"statusCode\":\"HTTP_302\"}}",
378+
"alb.ingress.kubernetes.io/actions.forward-single-tg": "{\"type\":\"forward\",\"forwardConfig\":{\"targetGroups\":[{\"serviceName\":\"app-1\",\"servicePort\":\"80\"}]}}",
379+
"alb.ingress.kubernetes.io/actions.forward-multiple-tg": "{\"type\":\"forward\",\"forwardConfig\":{\"targetGroups\":[{\"serviceName\":\"app-1\",\"servicePort\":\"80\",\"weight\":20},{\"serviceName\":\"app-2\",\"servicePort\":80,\"weight\":80}],\"targetGroupStickinessConfig\":{\"enabled\":true,\"durationSeconds\":200}}}",
380+
}
381+
if tf.Options.IPFamily == "IPv6" {
382+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
383+
annotation["alb.ingress.kubernetes.io/target-type"] = "ip"
384+
}
342385
ing := ingBuilder.
343386
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/response-503", PathType: &exact, Backend: ingResponse503Backend}).
344387
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/redirect-to-aws", PathType: &exact, Backend: ingRedirectToAWSBackend}).
345388
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/forward-single-tg", PathType: &exact, Backend: ingForwardSingleTGBackend}).
346389
AddHTTPRoute("", networking.HTTPIngressPath{Path: "/forward-multiple-tg", PathType: &exact, Backend: ingForwardMultipleTGBackend}).
347-
WithAnnotations(map[string]string{
348-
"kubernetes.io/ingress.class": "alb",
349-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
350-
"alb.ingress.kubernetes.io/actions.response-503": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"503\",\"messageBody\":\"503 error text\"}}",
351-
"alb.ingress.kubernetes.io/actions.redirect-to-aws": "{\"type\":\"redirect\",\"redirectConfig\":{\"host\":\"aws.amazon.com\",\"path\":\"/eks/\",\"port\":\"443\",\"protocol\":\"HTTPS\",\"query\":\"k=v\",\"statusCode\":\"HTTP_302\"}}",
352-
"alb.ingress.kubernetes.io/actions.forward-single-tg": "{\"type\":\"forward\",\"forwardConfig\":{\"targetGroups\":[{\"serviceName\":\"app-1\",\"servicePort\":\"80\"}]}}",
353-
"alb.ingress.kubernetes.io/actions.forward-multiple-tg": "{\"type\":\"forward\",\"forwardConfig\":{\"targetGroups\":[{\"serviceName\":\"app-1\",\"servicePort\":\"80\",\"weight\":20},{\"serviceName\":\"app-2\",\"servicePort\":80,\"weight\":80}],\"targetGroupStickinessConfig\":{\"enabled\":true,\"durationSeconds\":200}}}",
354-
}).Build(sandboxNS.Name, "ing")
390+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
355391
resStack := fixture.NewK8SResourceStack(tf, dp1, svc1, dp2, svc2, ing)
356392
resStack.Setup(ctx)
357393
defer resStack.TearDown(ctx)
@@ -435,6 +471,28 @@ var _ = Describe("vanilla ingress tests", func() {
435471
},
436472
}
437473

474+
annotation := map[string]string{
475+
"kubernetes.io/ingress.class": "alb",
476+
"alb.ingress.kubernetes.io/scheme": "internet-facing",
477+
"alb.ingress.kubernetes.io/actions.rule-path1": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Host is www.example.com OR anno.example.com\"}}",
478+
"alb.ingress.kubernetes.io/conditions.rule-path1": "[{\"field\":\"host-header\",\"hostHeaderConfig\":{\"values\":[\"anno.example.com\"]}}]",
479+
"alb.ingress.kubernetes.io/actions.rule-path2": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Path is /path2 OR /anno/path2\"}}",
480+
"alb.ingress.kubernetes.io/conditions.rule-path2": "[{\"field\":\"path-pattern\",\"pathPatternConfig\":{\"values\":[\"/anno/path2\"]}}]",
481+
"alb.ingress.kubernetes.io/actions.rule-path3": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Http header HeaderName is HeaderValue1 OR HeaderValue2\"}}",
482+
"alb.ingress.kubernetes.io/conditions.rule-path3": "[{\"field\":\"http-header\",\"httpHeaderConfig\":{\"httpHeaderName\": \"HeaderName\", \"values\":[\"HeaderValue1\", \"HeaderValue2\"]}}]",
483+
"alb.ingress.kubernetes.io/actions.rule-path4": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Http request method is GET OR HEAD\"}}",
484+
"alb.ingress.kubernetes.io/conditions.rule-path4": "[{\"field\":\"http-request-method\",\"httpRequestMethodConfig\":{\"Values\":[\"GET\", \"HEAD\"]}}]",
485+
"alb.ingress.kubernetes.io/actions.rule-path5": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Query string is paramA:valueA1 OR paramA:valueA2\"}}",
486+
"alb.ingress.kubernetes.io/conditions.rule-path5": "[{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramA\",\"value\":\"valueA1\"},{\"key\":\"paramA\",\"value\":\"valueA2\"}]}}]",
487+
"alb.ingress.kubernetes.io/actions.rule-path6": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Source IP is 192.168.0.0/16 OR 172.16.0.0/16\"}}",
488+
"alb.ingress.kubernetes.io/conditions.rule-path6": "[{\"field\":\"source-ip\",\"sourceIpConfig\":{\"values\":[\"192.168.0.0/16\", \"172.16.0.0/16\"]}}]",
489+
"alb.ingress.kubernetes.io/actions.rule-path7": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"multiple conditions applies\"}}",
490+
"alb.ingress.kubernetes.io/conditions.rule-path7": "[{\"field\":\"http-header\",\"httpHeaderConfig\":{\"httpHeaderName\": \"HeaderName\", \"values\":[\"HeaderValue\"]}},{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramA\",\"value\":\"valueA\"}]}},{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramB\",\"value\":\"valueB\"}]}}]",
491+
}
492+
if tf.Options.IPFamily == "IPv6" {
493+
annotation["alb.ingress.kubernetes.io/ip-address-type"] = "dualstack"
494+
annotation["alb.ingress.kubernetes.io/target-type"] = "ip"
495+
}
438496
ing := ingBuilder.
439497
AddHTTPRoute("www.example.com", networking.HTTPIngressPath{Path: "/path1", PathType: &exact, Backend: ingRulePath1Backend}).
440498
AddHTTPRoute("www.example.com", networking.HTTPIngressPath{Path: "/path2", PathType: &exact, Backend: ingRulePath2Backend}).
@@ -443,24 +501,7 @@ var _ = Describe("vanilla ingress tests", func() {
443501
AddHTTPRoute("www.example.com", networking.HTTPIngressPath{Path: "/path5", PathType: &exact, Backend: ingRulePath5Backend}).
444502
AddHTTPRoute("www.example.com", networking.HTTPIngressPath{Path: "/path6", PathType: &exact, Backend: ingRulePath6Backend}).
445503
AddHTTPRoute("www.example.com", networking.HTTPIngressPath{Path: "/path7", PathType: &exact, Backend: ingRulePath7Backend}).
446-
WithAnnotations(map[string]string{
447-
"kubernetes.io/ingress.class": "alb",
448-
"alb.ingress.kubernetes.io/scheme": "internet-facing",
449-
"alb.ingress.kubernetes.io/actions.rule-path1": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Host is www.example.com OR anno.example.com\"}}",
450-
"alb.ingress.kubernetes.io/conditions.rule-path1": "[{\"field\":\"host-header\",\"hostHeaderConfig\":{\"values\":[\"anno.example.com\"]}}]",
451-
"alb.ingress.kubernetes.io/actions.rule-path2": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Path is /path2 OR /anno/path2\"}}",
452-
"alb.ingress.kubernetes.io/conditions.rule-path2": "[{\"field\":\"path-pattern\",\"pathPatternConfig\":{\"values\":[\"/anno/path2\"]}}]",
453-
"alb.ingress.kubernetes.io/actions.rule-path3": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Http header HeaderName is HeaderValue1 OR HeaderValue2\"}}",
454-
"alb.ingress.kubernetes.io/conditions.rule-path3": "[{\"field\":\"http-header\",\"httpHeaderConfig\":{\"httpHeaderName\": \"HeaderName\", \"values\":[\"HeaderValue1\", \"HeaderValue2\"]}}]",
455-
"alb.ingress.kubernetes.io/actions.rule-path4": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Http request method is GET OR HEAD\"}}",
456-
"alb.ingress.kubernetes.io/conditions.rule-path4": "[{\"field\":\"http-request-method\",\"httpRequestMethodConfig\":{\"Values\":[\"GET\", \"HEAD\"]}}]",
457-
"alb.ingress.kubernetes.io/actions.rule-path5": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Query string is paramA:valueA1 OR paramA:valueA2\"}}",
458-
"alb.ingress.kubernetes.io/conditions.rule-path5": "[{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramA\",\"value\":\"valueA1\"},{\"key\":\"paramA\",\"value\":\"valueA2\"}]}}]",
459-
"alb.ingress.kubernetes.io/actions.rule-path6": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"Source IP is 192.168.0.0/16 OR 172.16.0.0/16\"}}",
460-
"alb.ingress.kubernetes.io/conditions.rule-path6": "[{\"field\":\"source-ip\",\"sourceIpConfig\":{\"values\":[\"192.168.0.0/16\", \"172.16.0.0/16\"]}}]",
461-
"alb.ingress.kubernetes.io/actions.rule-path7": "{\"type\":\"fixed-response\",\"fixedResponseConfig\":{\"contentType\":\"text/plain\",\"statusCode\":\"200\",\"messageBody\":\"multiple conditions applies\"}}",
462-
"alb.ingress.kubernetes.io/conditions.rule-path7": "[{\"field\":\"http-header\",\"httpHeaderConfig\":{\"httpHeaderName\": \"HeaderName\", \"values\":[\"HeaderValue\"]}},{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramA\",\"value\":\"valueA\"}]}},{\"field\":\"query-string\",\"queryStringConfig\":{\"values\":[{\"key\":\"paramB\",\"value\":\"valueB\"}]}}]",
463-
}).Build(sandboxNS.Name, "ing")
504+
WithAnnotations(annotation).Build(sandboxNS.Name, "ing")
464505
resStack := fixture.NewK8SResourceStack(tf, ing)
465506
resStack.Setup(ctx)
466507
defer resStack.TearDown(ctx)

test/e2e/run-e2e-test.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ echo "Running AWS Load Balancer Controller e2e tests with the following variable
1010
KUBE CONFIG: $KUBE_CONFIG_PATH
1111
CLUSTER_NAME: $CLUSTER_NAME
1212
REGION: $REGION
13+
IP_FAMILY: ${IP_FAMILY:-"IPv4"}
1314
OS_OVERRIDE: $OS_OVERRIDE"
1415

1516
function toggle_windows_scheduling(){
@@ -74,9 +75,15 @@ echo "Install aws-load-balancer-controller"
7475
helm upgrade -i aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=$CLUSTER_NAME --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller --set region=$REGION --set vpcId=$VPC_ID
7576

7677
#Start the test
77-
echo "Starting the ginkgo test suite"
78-
79-
(cd $SCRIPT_DIR && CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo -v -r --timeout 60m --failOnPending -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID || true)
78+
echo "Starting the ginkgo test suite"
79+
if [ "$IP_FAMILY" == "IPv4" ]; then
80+
(cd $SCRIPT_DIR && CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo -v -r --timeout 60m --failOnPending -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --ip-family=$IP_FAMILY || true)
81+
elif [ "$IP_FAMILY" == "IPv6" ]; then
82+
(cd $SCRIPT_DIR && CGO_ENABLED=0 GOOS=$OS_OVERRIDE ginkgo --skip="instance" -v -r --timeout 60m --failOnPending -- --kubeconfig=$KUBE_CONFIG_PATH --cluster-name=$CLUSTER_NAME --aws-region=$REGION --aws-vpc-id=$VPC_ID --ip-family=$IP_FAMILY || true)
83+
else
84+
echo "Invalid IP_FAMILY input, choose from IPv4 or IPv6 only"
85+
exit
86+
fi
8087

8188
# tail=-1 is added so that no logs are truncated
8289
# https://github.com/kubernetes/kubectl/issues/812

0 commit comments

Comments
 (0)