Skip to content

Commit 8f793a2

Browse files
committed
fix listener
Change-Id: Ic698eaf68037442e37bc9598ef544e8d28844464
1 parent 55184fe commit 8f793a2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

pkg/gateway/listener.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,27 @@ func translateListenerToEnvoyListener(listener gatewayv1.Listener) (map[resource
7272
},
7373
},
7474
HttpFilters: []*hcmv3.HttpFilter{
75+
// The router filter must be the last in the chain
7576
{
76-
Name: wellknown.Router, // The router filter must be the last in the chain
77+
Name: wellknown.Router,
78+
ConfigType: &hcmv3.HttpFilter_TypedConfig{
79+
TypedConfig: &anypb.Any{
80+
// Empty config for the router filter
81+
TypeUrl: "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router",
82+
},
83+
},
7784
},
7885
},
7986
}
80-
pbst, err := anypb.New(httpConnectionManager)
87+
hcmAny, err := anypb.New(httpConnectionManager)
8188
if err != nil {
8289
return nil, err
8390
}
8491
envoyListener.FilterChains = []*listenerv3.FilterChain{{
8592
Filters: []*listenerv3.Filter{{
8693
Name: wellknown.HTTPConnectionManager,
8794
ConfigType: &listenerv3.Filter_TypedConfig{
88-
TypedConfig: pbst,
95+
TypedConfig: hcmAny,
8996
},
9097
}},
9198
}}

0 commit comments

Comments
 (0)