Skip to content

Commit c528df7

Browse files
committed
remove tls protocol check
1 parent 150ade4 commit c528df7

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

internal/mode/static/state/dataplane/configuration.go

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,21 @@ func BuildConfiguration(
7070

7171
// buildPassthroughServers builds TLSPassthroughServers from TLSRoutes attaches to listeners.
7272
func buildPassthroughServers(g *graph.Graph) []Layer4VirtualServer {
73-
passthroughServers := []Layer4VirtualServer{}
73+
passthroughServers := make([]Layer4VirtualServer, 0)
7474
for _, l := range g.Gateway.Listeners {
7575
if !l.Valid {
7676
continue
7777
}
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+
})
9088
}
9189
}
9290
}

internal/mode/static/state/dataplane/configuration_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,16 +3450,6 @@ func TestCreatePassthroughServers(t *testing.T) {
34503450
Namespace: "default",
34513451
Name: "secure-app2",
34523452
}}: {},
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-
},
34633453
},
34643454
Valid: true,
34653455
},

0 commit comments

Comments
 (0)