-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
api: add NonForwardingAction route action type #16144
api: add NonForwardingAction route action type #16144
Conversation
Signed-off-by: Mark D. Roth <[email protected]>
// without forwarding to an upstream host. This will be used in non-proxy | ||
// xDS clients like the gRPC server. It could also be used in the future | ||
// in Envoy for a filter that directly generates responses for requests. | ||
NonForwardingAction non_forwarding_action = 18; |
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.
This makes sense. Just thinking loudly, and probably not worth the churn, shall other 'non-forwarding' actions (e.g. direct response and redirect) to be included here in the future?
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.
I think they'll probably remain separate. The main difference between those existing action types and this one is that those existing action types explicitly define everything that's needed to process the request (e.g., "reply with this specific HTTP status" or "redirect to this specific URL"), whereas this new type of action is basically saying "we won't be forwarding the request, but we're leaving it undefined how it will actually be handled". Some external code (e.g., the gRPC server application or an Envoy filter) will have to actually decide how to respond to the request.
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, will defer to @lizan for the rest of the review.
@@ -229,11 +229,18 @@ message Route { | |||
DirectResponseAction direct_response = 7; | |||
|
|||
// [#not-implemented-hide:] | |||
// If true, a filter will define the action (e.g., it could dynamically generate the | |||
// A filter-defined action (e.g., it could dynamically generate the |
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: weird word wrap.
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.
Fixed.
Signed-off-by: Mark D. Roth <[email protected]>
Signed-off-by: Mark D. Roth <[email protected]> Signed-off-by: Gokul Nair <[email protected]>
Signed-off-by: Mark D. Roth [email protected]
Commit Message: api: add NonForwardingAction route action type
Additional Description: Adds a new type of route action that is used in cases when not forwarding the request to an upstream server. This will be used by xDS-aware gRPC servers. It could also be used in the future by Envoy if there is a filter that directly generates responses to requests.
Risk Level: Low
Testing: N/A
Docs Changes: Included in PR
Release Notes: N/A
Platform Specific Features: N/A
Continuing discussion from #13366.
CC @htuch @ejona86 @dfawley