Skip to content

Conversation

@guydc
Copy link
Contributor

@guydc guydc commented Apr 25, 2025

What type of PR is this?

What this PR does / why we need it:
Adds an option for extension server to mutate clusters with context derived from GRPCRoute/HTTPRoute BackendRefs ExtensionRef HTTPRouteFilters.

Since Upstream HTTP Filters are mapped to cluster-level HTTPProtocolOptions in envoy, it makes most sense to aggregate BackendRef ExternalRefs and provide them as context for cluster mutation (as opposed to CLA/Endpoint mutation).

Which issue(s) this PR fixes:

Relates to #5561

Release Notes: Yes/No

Signed-off-by: Guy Daich <guy.daich@sap.com>
@guydc guydc requested a review from a team as a code owner April 25, 2025 23:34
@codecov
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.28%. Comparing base (c55b814) to head (ed627ec).
Report is 171 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5821      +/-   ##
==========================================
- Coverage   65.31%   65.28%   -0.03%     
==========================================
  Files         221      221              
  Lines       35314    35314              
==========================================
- Hits        23064    23056       -8     
- Misses      10825    10829       +4     
- Partials     1425     1429       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Guy Daich <guy.daich@sap.com>
// PostClusterExtensionContext provides resources introduced by an extension and watched by Envoy Gateway
// additional context information can be added to this message as more use-cases are discovered
message PostClusterExtensionContext {
// Resources introduced by the extension that were used as extensionRefs in an HTTPRoute/GRPCRoute BackendRefs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Quinn here, we met last week.

Will one of these ExtensionResources be the gateway CR that is currently used in the xDS translation?

The backrefs by themselves give us the HTTPRoutes but the parentsRefs of those may be all the gateways instead of the current gateway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support additional use cases (besides extension server), I was thinking of propagating the GW context in XDS Metadata. That way, the information is also available to dataplane filters and extensions. The extension server can also parse this metadata.
So, first step would be to complete #5523, and then add an opt-in option for including metadata from additional related resources (GW, Route, ... ).

// PostClusterModifyResponse is the expected response from an extension and contains a modified version of the Cluster that was sent
// If an extension returns a nil Cluster then it will not be modified
message PostClusterModifyResponse {
envoy.config.route.v3.Route route = 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return a cluster?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! my bad.

guydc added 2 commits April 29, 2025 07:21
Signed-off-by: Guy Daich <guy.daich@sap.com>
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants