feat: support original dst based routing#6271
feat: support original dst based routing#6271Xunzhuo wants to merge 2 commits intoenvoyproxy:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6271 +/- ##
==========================================
+ Coverage 70.88% 70.96% +0.07%
==========================================
Files 220 220
Lines 37259 37400 +141
==========================================
+ Hits 26412 26541 +129
- Misses 9299 9308 +9
- Partials 1548 1551 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7198490 to
7943308
Compare
|
we discussed this in the community meeting yesterday and the preference is, instead of adding a new gateway/api/v1alpha1/backend_types.go Line 81 in e78e268 OverrideHostSource
|
a274521 to
bfff78b
Compare
|
Here is how it looks like now: |
bbd848f to
146e176
Compare
internal/xds/translator/testdata/in/xds-ir/static-resolver.yaml
Outdated
Show resolved
Hide resolved
0104551 to
9448b0d
Compare
|
@Xunzhuo can you fix the lint check (failing due to extra line)? |
9448b0d to
fbdad46
Compare
|
@rudrakhp working on it, thanks! |
fbdad46 to
529f8da
Compare
|
PTAL @rudrakhp thanks! |
|
/retest |
zhaohuabing
left a comment
There was a problem hiding this comment.
Can we add an e2e test to verify this works?
514fe58 to
f522dcc
Compare
|
I am verifying the e2e test failures today, and had a discussion with @wbpcode, this current API looks not complete: The HostOverride lbPolicy requires the fallback upstream, so the previous approach is not correct, should be done by adding at least one endpoint in Backend when type is HostOverride This can be achieved another feature like, we do best-match for the pod in cluster, but if no best-match pod selected, use the endpoint in Backend to fallback, even it can be out-of-cluster. |
e61cb4a to
fea0cce
Compare
|
@Xunzhuo if overrideHost LB Policy + Original Dst cluster dont work together in Envoy proxy, we'll have to use Option 1 #6234 (comment) |
Signed-off-by: bitliu <bitliu@tencent.com>
Signed-off-by: bitliu <bitliu@tencent.com>
fea0cce to
a0d70fa
Compare
|
how envoy impl the host override(source/extensions/load_balancing_policies/override_host/load_balancer.cc): forward to an endpoint which is not in the cluster(I manually add 3 endpoint to the cluster 10.96.93.71:8080, 10.96.166.130:8080, 10.96.82.175:8080): forward to an endpoint which in the cluster: In summary, if we want to pick an endpoint with the host override policy, it has to be in-range of the endpoints belong to the cluster, so we cannot use the dummy endpoint to hack, it will always go to the fallback policy. |
|
The Backend API may only fit for the original dst implementation: Header: Metadata: |
|
originalDestination is not a great name imo 🤷 |
|
@arkodg we need some naming genius to help us 😄 |
|
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! |
What type of PR is this?
feat: support host override based routing
What this PR does / why we need it:
support choose the ep by specific patterns: header, metadata.
Scenarios like llm inference endpoint picker
Which issue(s) this PR fixes:
Fixes #6234
Release Notes: Yes