Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Filters in BackendRefs #2572

Closed
MregXN opened this issue Feb 7, 2024 · 14 comments · Fixed by #3246 or #3558
Closed

Support Filters in BackendRefs #2572

MregXN opened this issue Feb 7, 2024 · 14 comments · Fixed by #3246 or #3558
Assignees
Labels
area/translator Issues related to Gateway's translation service, e.g. translating Gateway APIs into the IR. no stalebot
Milestone

Comments

@MregXN
Copy link

MregXN commented Feb 7, 2024

I have encountered difficulties while using the Kubernetes Gateway API Filters under BackendRefs. Is the current envoy gateway already supported?

@MregXN MregXN added the triage label Feb 7, 2024
@arkodg
Copy link
Contributor

arkodg commented Feb 7, 2024

@MregXN this is not supported, highlighted in https://gateway.envoyproxy.io/latest/user/gatewayapi-support/#httproute
keeping this issue open to we can highlight this using a status condition

@arkodg arkodg added area/translator Issues related to Gateway's translation service, e.g. translating Gateway APIs into the IR. road-to-ga and removed triage labels Feb 7, 2024
@arkodg arkodg added the help wanted Extra attention is needed label Feb 7, 2024
@arkodg arkodg added this to the v1.0.0-rc1 milestone Feb 7, 2024
@cnvergence cnvergence self-assigned this Feb 14, 2024
@cnvergence cnvergence removed the help wanted Extra attention is needed label Feb 14, 2024
@MregXN
Copy link
Author

MregXN commented Feb 16, 2024

I think I can help in making this issue achievable.
But it seems that the fields of ir.HTTPRoute are not adequate for Filters in BackendRefs support because all filters will be translatrd into Redirect filed and there is no way to differentiate based on backendref. Should we need to somehow extend some new fields to ir.HTTPRoute ? @arkodg @cnvergence

@arkodg arkodg removed the road-to-ga label Feb 27, 2024
@arkodg arkodg modified the milestones: v1.0.0-rc1, Backlog Feb 27, 2024
@arkodg arkodg changed the title Filters in BackendRefs are not working Support Filters in BackendRefs Feb 27, 2024
@arkodg
Copy link
Contributor

arkodg commented Feb 27, 2024

@MregXN can you share your use case of why you'd prefer enabling the filter on the backendRef instead of the route

@MregXN
Copy link
Author

MregXN commented Feb 28, 2024

@arkodg
I have two backend services pointing to the same hostname and path, with different weights set to distribute access traffic proportionally to the corresponding backend services. However, I now need to apply forwarding operations when traffic is routed to one of the backend services only. Therefore, I need to use a filter that only affects one backend. Using the filter in route will affect both backends simultaneously.

@arkodg
Copy link
Contributor

arkodg commented Feb 28, 2024

@MregXN by forwarding operations, do you mean appending headers to the request or response ?

@MregXN
Copy link
Author

MregXN commented Feb 28, 2024

@arkodg
It has nothing to do with the header. I hope the user can receive the 302 status code when their traffic is routed to the specific backend.

@baildagq
Copy link

@MregXN hi, is there any process?

@Xunzhuo
Copy link
Member

Xunzhuo commented Mar 25, 2024

I think this is a reasonable request for filter implementation, thoughts on this @arkodg ?

@MregXN
Copy link
Author

MregXN commented Mar 25, 2024

@MregXN hi, is there any process?

I haven't started as I think we haven't reached a consensus yet.

@dprotaso
Copy link

dprotaso commented Apr 2, 2024

BackendRef Filters are needed by Knative - knative-extensions/net-gateway-api#566

We specifically append headers after a traffic split - this enables our scale to zero feature as well as our ability to handle 'burst capacity'

@arkodg
Copy link
Contributor

arkodg commented Apr 5, 2024

I miscalculated the effort to get this in :(
The implementation seems straightforward

  1. Add new filter related fields in the DestinationSetting IR similar to this
  2. Set them in the Gateway API translator
  3. In the Xds Side, use a Weighted Cluster to represent this case, and populate the fields
    https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-weightedcluster-clusterweight

The only issue I see is, there is no support for these specific filters at the weighted cluster level

@arkodg
Copy link
Contributor

arkodg commented Apr 5, 2024

@cnvergence planning on working on this one ?

@arkodg arkodg modified the milestones: Backlog, v1.1.0-rc1 Apr 5, 2024
@cnvergence
Copy link
Member

sure, I can continue on this one
seems like a valid feature

Copy link

github-actions bot commented May 5, 2024

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/translator Issues related to Gateway's translation service, e.g. translating Gateway APIs into the IR. no stalebot
Projects
No open projects
6 participants