File tree Expand file tree Collapse file tree 2 files changed +11
-23
lines changed
internal/mode/static/state/dataplane Expand file tree Collapse file tree 2 files changed +11
-23
lines changed Original file line number Diff line number Diff line change @@ -70,23 +70,21 @@ func BuildConfiguration(
70
70
71
71
// buildPassthroughServers builds TLSPassthroughServers from TLSRoutes attaches to listeners.
72
72
func buildPassthroughServers (g * graph.Graph ) []Layer4VirtualServer {
73
- passthroughServers := []Layer4VirtualServer {}
73
+ passthroughServers := make ( []Layer4VirtualServer , 0 )
74
74
for _ , l := range g .Gateway .Listeners {
75
75
if ! l .Valid {
76
76
continue
77
77
}
78
- if l .Source .Protocol == v1 .TLSProtocolType {
79
- for _ , r := range l .L4Routes {
80
- if ! r .Valid {
81
- continue
82
- }
83
- for _ , h := range r .Spec .Hostnames {
84
- passthroughServers = append (passthroughServers , Layer4VirtualServer {
85
- Hostname : string (h ),
86
- UpstreamName : r .Spec .BackendRef .ServicePortReference (),
87
- Port : int32 (l .Source .Port ),
88
- })
89
- }
78
+ for _ , r := range l .L4Routes {
79
+ if ! r .Valid {
80
+ continue
81
+ }
82
+ for _ , h := range r .Spec .Hostnames {
83
+ passthroughServers = append (passthroughServers , Layer4VirtualServer {
84
+ Hostname : string (h ),
85
+ UpstreamName : r .Spec .BackendRef .ServicePortReference (),
86
+ Port : int32 (l .Source .Port ),
87
+ })
90
88
}
91
89
}
92
90
}
Original file line number Diff line number Diff line change @@ -3450,16 +3450,6 @@ func TestCreatePassthroughServers(t *testing.T) {
3450
3450
Namespace : "default" ,
3451
3451
Name : "secure-app2" ,
3452
3452
}}: {},
3453
- {NamespacedName : types.NamespacedName {
3454
- Namespace : "default" ,
3455
- Name : "secure-app3" ,
3456
- }}: {
3457
- Valid : true ,
3458
- Spec : graph.L4RouteSpec {
3459
- Hostnames : []v1.Hostname {"test.example.com" },
3460
- BackendRef : graph.BackendRef {},
3461
- },
3462
- },
3463
3453
},
3464
3454
Valid : true ,
3465
3455
},
You can’t perform that action at this time.
0 commit comments