api: Add mechanism for filters to define route action.#8956
api: Add mechanism for filters to define route action.#8956htuch merged 6 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Mark D. Roth <roth@google.com>
api/envoy/api/v2/route/route.proto
Outdated
|
|
||
| // [#not-implemented-hide:] | ||
| // If true, a filter will overwrite some or all of the RouteAction proto. | ||
| bool filter_overwrites_route_action = 17; |
There was a problem hiding this comment.
I thought we had discussed adding a FilterAction into the action oneof below with an Any?
There was a problem hiding this comment.
Ah, okay -- that makes sense. I think I misunderstood your suggestion earlier.
Is this more like what you had in mind?
Signed-off-by: Mark D. Roth <roth@google.com>
api/envoy/api/v2/route/route.proto
Outdated
| message FilterAction { | ||
| oneof action { | ||
| google.protobuf.Any filter_action = 1; | ||
| google.protobuf.Struct typed_filter_action = 2; |
There was a problem hiding this comment.
Yep, this is what I was thinking. The nifty thing is that it's possible to stuff a serialized RouteAction in here, with missing cluster for your use case, so no need to redefine any protos for that.
Signed-off-by: Mark D. Roth <roth@google.com>
api/envoy/api/v2/route/route.proto
Outdated
| DirectResponseAction direct_response = 7; | ||
|
|
||
| // [#not-implemented-hide:] | ||
| // If true, a filter will define the RouteAction. |
There was a problem hiding this comment.
Question: Should this have the ability to define just RouteAction, or could it also generate a RedirectAction or a DirectResponseAction?
There was a problem hiding this comment.
Yeah, maybe leave this as "the action" and we can offer multiple internal interfaces. We'll still only have a single Any as config though.
Signed-off-by: Mark D. Roth <roth@google.com>
htuch
left a comment
There was a problem hiding this comment.
LGTM, thanks, will hand off to @mattklein123 to merge.
Signed-off-by: Mark D. Roth <roth@google.com>
|
LGTM, thanks. Can you merge master to hopefully fix CI? /wait |
…ride Signed-off-by: Mark D. Roth <roth@google.com>
Description: Add a mechanism for a filter to define the action for a route.
Risk Level: Low
Testing: N/A
Docs Changes: Inline with proto change.
Release Notes: N/A
Fixes #8953.
@htuch and @mattklein123, I'm proposing this as a simple bool, because I'm not sure what else we'd need to put in this field. But I'm also fine with changing it to an Any, as we discussed. Discussion welcome.