Repository navigation
Support upstream http filters with tcp tunneling - #27183
Conversation
Signed-off-by: Vikas Choudhary <[email protected]>
There was a problem hiding this comment.
want to pass nullptr but since onGenericPoolReady() accepts a reference, passing nullptr gives warning. I was not sure if I should change the function signature to accept a pointer because that would require updating so many consumers of the api in other places. For now passing this dummy local_connection_info_provider which eventually gets ignored based on feature flag
8ca891e to
7dfeaa4
Compare
Signed-off-by: Vikas Choudhary <[email protected]>
7dfeaa4 to
dd45f88
Compare
|
@vikaschoudhary16 please avoid force pushing in the future as it removes comment anchors to source code. It is ok to just keep pushing new commits to the PR. Conceptually looks good to me. Please also add tests. |
|
/wait |
|
Thanks @vikaschoudhary16, it's nice to see that there's more demand for this feature and awesome you were able to make progress with this! One thing I'm wondering about is - I understand that since
The difference between these two is that the first will be applied to all In terms of API, the second could be something like this: My question is, which approach did you take in this implementation (or both), and if it's one of them, is it currently implemented in a way that could be extended to support the additional approach sometime in the future? Thanks again for contributing on this, that's awesome. |
Signed-off-by: Vikas Choudhary <[email protected]>
Hi, I took first approach i.e upstream cluster and no api change. Though I think it should be possible to extend it and let filters, if specified, in the tunneling config override the upstream cluster filters. |
Thanks, how about a use case where I want them to be combined? Let's say there's some upstream HTTP filter that I want to be applied to all flows, so I put it in the upstream cluster config, and on some of the |
alyssawilk
left a comment
There was a problem hiding this comment.
cool, I think this is largely the way I'd start. I'd get things working e2e with the tcp proxy integration test as a next step.
There was a problem hiding this comment.
I think in the new path we can merge the HTTP1 and HTTP2 upstreams, as the upstream codec filter should take care of per codec logic. so maybe have a new HttpUpstream which handles both and it can call newStream when created?
There was a problem hiding this comment.
and newStream definition will be noop(i.e do nothing and return) in Http1Upstream and Http2Upstream?
There was a problem hiding this comment.
added new HttpUpstream
|
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
alyssawilk
left a comment
There was a problem hiding this comment.
My only two remaining comments are nits - if you prefer I'm happy to merge as is (so sorry about review delay!) and you can fix in your next follow-up.
Along with addressing the TODOs I think we're going to want to to add a BUNCH of e2e tests testing filter state but those can all be follow-up as well.
| {Http::Headers::get().Host, config_.host(downstream_info_)}, | ||
| }); | ||
|
|
||
| if (config_.usePost()) { |
There was a problem hiding this comment.
move definition of scheme here?
| return false; | ||
| } | ||
| return true; | ||
| default: |
There was a problem hiding this comment.
please no default: if we need to have a return outside the switch for GCC that's fine
Hey, thanks for taking a look. |
|
ah, will have to rebase so will address nits as well |
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
7f57b0d to
617a647
Compare
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
07ac4cc to
deb2625
Compare
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
Signed-off-by: Vikas Choudhary <[email protected]>
52096d1 to
046012d
Compare
…27183)" This reverts commit 50e9108. Signed-off-by: Alyssa Wilk <[email protected]>
…32980) This reverts commit 50e9108. Signed-off-by: Alyssa Wilk <[email protected]>
…oyproxy#27183)" (envoyproxy#32980)" This reverts commit 04835af. Signed-off-by: Vikas Choudhary <[email protected]>
…27183)" (envoyproxy#32980) This reverts commit 50e9108. Signed-off-by: Alyssa Wilk <[email protected]> Signed-off-by: Antonio Leonti <[email protected]>
)" (#32980)" (#32991) Revert "Revert "Support upstream http filters with tcp tunneling (#27183)" (#32980)" Enable upstream_http_filters_with_tcp_proxy only in tcpproxy integration tests Signed-off-by: Vikas Choudhary <[email protected]>
As suggested in this comment,
Router::UpstreamRequestis being initialized and owned byTcpProxy::CombinedUpstream, which is replacement forTcpProxy::HttpUpstream. EventuallyTcpProxy::HttpUpstreamwill be removed."Combined" in
CombinedUpstreamsignifies that logic of this class,unlike currentTcpProxy::HttpUpstream, does not depend on H1/H2/H3
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]