@@ -57,7 +57,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
5757 Scheme : & interf ,
5858 ListenerConfigurations : listenerConfigurationForHeaderModification ,
5959 }
60- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
60+ instanceTargetType := elbv2gw .TargetTypeInstance
61+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
62+ DefaultConfiguration : elbv2gw.TargetGroupProps {
63+ TargetType : & instanceTargetType ,
64+ },
65+ }
6166 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
6267 gwListeners := []gwv1.Listener {
6368 {
@@ -135,9 +140,9 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
135140 err := tf .HTTPVerifier .VerifyURL (url , http .ResponseCodeMatches (200 ))
136141 Expect (err ).NotTo (HaveOccurred ())
137142 })
138- By ("cross-ns listener should return 503 as no ref grant is available" , func () {
143+ By ("cross-ns listener should return 500 as no ref grant is available" , func () {
139144 url := fmt .Sprintf ("http://%v:5000/any-path" , dnsName )
140- err := tf .HTTPVerifier .VerifyURL (url , http .ResponseCodeMatches (503 ))
145+ err := tf .HTTPVerifier .VerifyURL (url , http .ResponseCodeMatches (500 ))
141146 Expect (err ).NotTo (HaveOccurred ())
142147 })
143148 By ("confirming the route status" , func () {
@@ -191,9 +196,9 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
191196 // Give some time to have the reference grant to be deleted
192197 time .Sleep (2 * time .Minute )
193198 })
194- By ("cross-ns listener should return 503 as no ref grant is available" , func () {
199+ By ("cross-ns listener should return 500 as no ref grant is available" , func () {
195200 url := fmt .Sprintf ("http://%v:5000/any-path" , dnsName )
196- err := tf .HTTPVerifier .VerifyURL (url , http .ResponseCodeMatches (503 ))
201+ err := tf .HTTPVerifier .VerifyURL (url , http .ResponseCodeMatches (500 ))
197202 Expect (err ).NotTo (HaveOccurred ())
198203 })
199204 By ("confirming the route status" , func () {
@@ -209,7 +214,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
209214 lbcSpec := elbv2gw.LoadBalancerConfigurationSpec {
210215 Scheme : & interf ,
211216 }
212- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
217+ instanceTargetType := elbv2gw .TargetTypeInstance
218+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
219+ DefaultConfiguration : elbv2gw.TargetGroupProps {
220+ TargetType : & instanceTargetType ,
221+ },
222+ }
213223 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
214224 gwListeners := []gwv1.Listener {
215225 {
@@ -414,7 +424,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
414424 lbcSpec := elbv2gw.LoadBalancerConfigurationSpec {
415425 Scheme : & interf ,
416426 }
417- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
427+ instanceTargetType := elbv2gw .TargetTypeInstance
428+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
429+ DefaultConfiguration : elbv2gw.TargetGroupProps {
430+ TargetType : & instanceTargetType ,
431+ },
432+ }
418433 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
419434 gwListeners := []gwv1.Listener {
420435 {
@@ -477,7 +492,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
477492 lbcSpec := elbv2gw.LoadBalancerConfigurationSpec {
478493 Scheme : & interf ,
479494 }
480- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
495+ instanceTargetType := elbv2gw .TargetTypeInstance
496+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
497+ DefaultConfiguration : elbv2gw.TargetGroupProps {
498+ TargetType : & instanceTargetType ,
499+ },
500+ }
481501
482502 matchIndex := []int {0 , 2 }
483503 sourceIp := "10.0.0.0/8"
@@ -681,7 +701,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
681701 DefaultCertificate : & cert ,
682702 }
683703 lbcSpec .ListenerConfigurations = & []elbv2gw.ListenerConfiguration {lsConfig }
684- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
704+ instanceTargetType := elbv2gw .TargetTypeInstance
705+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
706+ DefaultConfiguration : elbv2gw.TargetGroupProps {
707+ TargetType : & instanceTargetType ,
708+ },
709+ }
685710 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
686711 gwListeners := []gwv1.Listener {
687712 {
@@ -781,7 +806,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
781806 },
782807 }
783808 lbcSpec .ListenerConfigurations = & []elbv2gw.ListenerConfiguration {lsConfig }
784- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
809+ instanceTargetType := elbv2gw .TargetTypeInstance
810+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
811+ DefaultConfiguration : elbv2gw.TargetGroupProps {
812+ TargetType : & instanceTargetType ,
813+ },
814+ }
785815 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
786816 gwListeners := []gwv1.Listener {
787817 {
@@ -885,7 +915,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
885915 DefaultCertificate : & cert ,
886916 }
887917 lbcSpec .ListenerConfigurations = & []elbv2gw.ListenerConfiguration {lsConfig }
888- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
918+ instanceTargetType := elbv2gw .TargetTypeInstance
919+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
920+ DefaultConfiguration : elbv2gw.TargetGroupProps {
921+ TargetType : & instanceTargetType ,
922+ },
923+ }
889924 gwListeners := []gwv1.Listener {
890925 {
891926 Name : "https443" ,
@@ -1071,7 +1106,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
10711106 DefaultCertificate : & cert ,
10721107 }
10731108 lbcSpec .ListenerConfigurations = & []elbv2gw.ListenerConfiguration {lsConfig }
1074- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
1109+ instanceTargetType := elbv2gw .TargetTypeInstance
1110+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
1111+ DefaultConfiguration : elbv2gw.TargetGroupProps {
1112+ TargetType : & instanceTargetType ,
1113+ },
1114+ }
10751115 gwListeners := []gwv1.Listener {
10761116 {
10771117 Name : "https443" ,
@@ -1284,7 +1324,12 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
12841324 httpsLsConfig ,
12851325 }
12861326
1287- tgSpec := elbv2gw.TargetGroupConfigurationSpec {}
1327+ instanceTargetType := elbv2gw .TargetTypeInstance
1328+ tgSpec := elbv2gw.TargetGroupConfigurationSpec {
1329+ DefaultConfiguration : elbv2gw.TargetGroupProps {
1330+ TargetType : & instanceTargetType ,
1331+ },
1332+ }
12881333 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
12891334 gwListeners := []gwv1.Listener {
12901335 {
@@ -1413,8 +1458,11 @@ var _ = Describe("test k8s alb gateway using instance targets reconciled by the
14131458 DefaultCertificate : & cert ,
14141459 }
14151460 lbcSpec .ListenerConfigurations = & []elbv2gw.ListenerConfiguration {lsConfig }
1461+ instanceTargetType := elbv2gw .TargetTypeInstance
14161462 tgSpec := elbv2gw.TargetGroupConfigurationSpec {
1417- DefaultConfiguration : elbv2gw.TargetGroupProps {},
1463+ DefaultConfiguration : elbv2gw.TargetGroupProps {
1464+ TargetType : & instanceTargetType ,
1465+ },
14181466 }
14191467 lrcSpec := elbv2gw.ListenerRuleConfigurationSpec {}
14201468 gwListeners := []gwv1.Listener {
0 commit comments