gateway icon indicating copy to clipboard operation
gateway copied to clipboard

feat: support BackendRef HTTP filters

Open cnvergence opened this issue 1 year ago • 8 comments

What type of PR is this?

What this PR does / why we need it:

  • Support HTTP Filters in the BackendRef and translate them to WeightedCluster in the XDS. Currently, only support for RequestHeaderModifiier and ResponseHeaderModifier type, as it is the only filter with straightforward support in https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-weightedcluster-clusterweight
  • Validate other types of filters

Which issue(s) this PR fixes:

Fixes https://github.com/envoyproxy/gateway/issues/2572 https://github.com/envoyproxy/gateway/issues/3338

cnvergence avatar Apr 22 '24 17:04 cnvergence

this may conflict with https://github.com/envoyproxy/gateway/pull/3212, should decide which go first. cc @envoyproxy/gateway-maintainers

zirain avatar May 07 '24 23:05 zirain

/retest

cnvergence avatar May 09 '24 09:05 cnvergence

Codecov Report

Attention: Patch coverage is 78.88889% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 67.33%. Comparing base (8ca2675) to head (cf2bbcf).

Files Patch % Lines
internal/gatewayapi/route.go 70.58% 6 Missing and 4 partials :warning:
internal/xds/translator/route.go 85.36% 3 Missing and 3 partials :warning:
internal/gatewayapi/validate.go 72.72% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3246   +/-   ##
=======================================
  Coverage   67.32%   67.33%           
=======================================
  Files         166      166           
  Lines       19211    19275   +64     
=======================================
+ Hits        12934    12979   +45     
- Misses       5347     5358   +11     
- Partials      930      938    +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 09:05 codecov[bot]

/retest

cnvergence avatar May 15 '24 08:05 cnvergence

@zirain rebased the PR, as your changes went first 😄

cnvergence avatar May 15 '24 09:05 cnvergence

hey @cnvergence small nits, overall LGTM, thanks for adding this feature ! you will also want to undo parts of https://github.com/envoyproxy/gateway/pull/2620 in this PR, or even modify that code to add the status if any of the filters are the ones from below

Path rewrites
Redirect
Mirroring

arkodg avatar May 16 '24 02:05 arkodg

/retest

cnvergence avatar May 19 '24 06:05 cnvergence

/retest

cnvergence avatar May 20 '24 09:05 cnvergence