-
Notifications
You must be signed in to change notification settings - Fork 276
envoy/lds: create inbound filter chains per service port #2140
Conversation
This change makes the inbound filter chains for in-mesh and ingress a per port construct, so that protocol specific filters and rules can be enforced per port. Since protocol specific filters (ex. TCP proxy vs HTTP Connection Manager) cannot be filter on the same filter chain, a port specific filter chain is created to be able to handle per port:protocol filtering. Additionally, this change adds new tests for the ingress filter chain and updates the existing tests for mesh filter chains. This is required for TCP filtering and routing: openservicemesh#1521 Signed-off-by: Shashank Ram <shashank08@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2140 +/- ##
==========================================
- Coverage 57.86% 57.81% -0.06%
==========================================
Files 144 144
Lines 5995 6021 +26
==========================================
+ Hits 3469 3481 +12
- Misses 2523 2537 +14
Partials 3 3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just minors
@@ -57,27 +65,43 @@ func newIngressFilterChain(cfg configurator.Configurator, svc service.MeshServic | |||
} | |||
} | |||
|
|||
func getIngressFilterChains(svc service.MeshService, cfg configurator.Configurator) []*xds_listener.FilterChain { | |||
func (lb *listenerBuilder) getIngressFilterChains(svc service.MeshService) []*xds_listener.FilterChain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, unrelated to the commit, should it be ForService
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, fair enough.
Description:
This change makes the inbound filter chains for in-mesh
and ingress a per port construct, so that protocol
specific filters and rules can be enforced per port.
Since protocol specific filters (ex. TCP proxy vs HTTP
Connection Manager) cannot be filters on the same filter
chain, a port specific filter chain is created to be
able to handle per port:protocol filtering.
Additionally, this change adds new tests for the ingress
filter chain and updates the existing tests for mesh filter
chains. The file
lds/response_test.go
was ingress specificand has been rewritten to
lds/ingress_test.go
.This is required for TCP filtering and routing: #1521
Affected area:
Please answer the following questions with yes/no.
No