Added VHDS protobuf message and updated RouteConfig to include it.#6418
Added VHDS protobuf message and updated RouteConfig to include it.#6418htuch merged 1 commit intoenvoyproxy:masterfrom dmitri-d:vhds-proto
Conversation
|
@htuch: This is VHDS protocol related changes. I'm thinking that DeltaRequest/Response nonce use warrants a dedicated PR, when we get there? |
|
Hmm. I don't think CI likes "not-implemented:hide" here: https://github.com/envoyproxy/envoy/pull/6418/files#diff-1a4a1f5cf0eae786da45b64903e8dd21R66. Complains that import here: https://github.com/envoyproxy/envoy/pull/6418/files#diff-1a4a1f5cf0eae786da45b64903e8dd21R12 is not being used. I suppose I can omit it? |
|
htuch
left a comment
There was a problem hiding this comment.
Great, this is nice self-contained PR.
/wait
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Can you describe the intended final merge semantics?
There was a problem hiding this comment.
Smallest nit in the world: the last sentence is missing a period at the end.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Only one protodoc-title per .proto :)
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Can you provide some discussion comparable to that for RouteDiscoveryService. In particular, should cover what the resource type is embedded in Any and how this related to RDS and expected use cases.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
You need to fix the Bazel target deps to include config_source to fix the build.
api/XDS_PROTOCOL.md
Outdated
There was a problem hiding this comment.
Is it better to say
RDS updates related to the newly added listeners must arrive after CDS/EDS/LDS updates
VHDS updates (if any) related to the newly added Route Configurations must arrive after RDS updates
There was a problem hiding this comment.
That sounds better I think.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
I think this should be nullable. If VHDS is enabled, it makes sense for virtual host updates to come over VHDS while route configs (minus virtual hosts) come across RDS.
There was a problem hiding this comment.
Should drop the semicoolon after virtual_hosts =2
There was a problem hiding this comment.
Agree, removed that.
|
LGTM |
htuch
left a comment
There was a problem hiding this comment.
Looks good, just a bunch of nits around formatting and a few comments requests, thanks.
/wait
api/XDS_PROTOCOL.md
Outdated
api/envoy/api/v2/rds.proto
Outdated
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
There was a problem hiding this comment.
Added the reference
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Nit: the preferred RST formatting for literals such as header name is something like *host*
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
*resource_names_subscribe* (or do a :ref: link to the field name).
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
I think we need 1-2 sentences explaining what a VHDS is and why you need one :)
There was a problem hiding this comment.
Added a short explanation
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Nit * syntax or :ref: for these field names.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
, with *vhds* derived configuration taking precedence
|
Also, needs DCO/format fixes. |
|
|
|
@htuch: I'll squash the commits once you are happy with the PR, I thought keeping them as is might help during the review. |
htuch
left a comment
There was a problem hiding this comment.
I think last few comments and we're good to go, thanks.
/wait
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Smallest nit in the world: the last sentence is missing a period at the end.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
You can drop this line entirely actually, the entry above is actually file-wide.
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
This message should be // [#not-implemented-hide:]; it's visible at the CI generated docs https://192807-65214191-gh.circle-artifacts.com/0/source/generated/docs/api-v2/api/v2/rds.proto.html
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
"during the processing of an HTTP request if..."
api/envoy/api/v2/rds.proto
Outdated
There was a problem hiding this comment.
Nit: you can actually link directly to fields, grep for envoy_api_field_ to see how.
|
|
@dmitri-d LGTM, can you fix format and I can merge? DCO seems to be green. Thanks. |
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
|
|
Thanks for the reviews, @htuch! |
| // [#comment:next free field: 9] | ||
| // Virtual Host Discovery Service (VHDS) is used to dynamically update the list of virtual hosts for | ||
| // a given RouteConfiguration. If VHDS is configured a virtual host list update will be triggerred | ||
| // during the processing of an HTTP request if a route for the request cannot be resolved. The |
There was a problem hiding this comment.
@mattklein123 how would this work as an HTTP filter? Don't we need an initial route/cluster pick before we start down the HTTP filter chain? I think we were thinking of augmenting HCM to handle this.
There was a problem hiding this comment.
No, we still iterate all filters even if there is no route, so we can have an optional filter which pauses and fetches a new VHDS entry if users want that functionality vs. just standard eventually consistent VHDS. I would argue this is a cleaner design.
There was a problem hiding this comment.
@mattklein123 yeah, it is arguably much cleaner. What to do about things that are done by HCM in decodeHeaders before filter execution though, e.g.
envoy/source/common/http/conn_manager_impl.cc
Line 701 in 1cf59d4
RouteConfiguration.
There was a problem hiding this comment.
I don't have all the answers right now, but I think this code should be moved into the route refresh code anyway, since arguably the timeout should be changed if the route changes. This would then "just work" on the on-demand VHDS filter. I'm pretty sure we can make this work cleanly as a filter.
There was a problem hiding this comment.
That sounds good. So, there will need to be some HCM changes, but we'll push most of the logic into a filter. @dmitri-d WDYT?
There was a problem hiding this comment.
That's pretty close to the WIP implementation (see https://github.com/envoyproxy/envoy/pull/6406/files#diff-be24bc0fe90bba5c4e871fb56928e085R12). An (the main?) issue with moving code into refreshCachedRoute is probably going to be here:
envoy/source/common/http/conn_manager_impl.cc
Line 686 in 1cf59d4
There was a problem hiding this comment.
cc @alyssawilk for comment. I think we might be able to handle this via an internal redirect from the filter if we can't figure out a more elegant solution during route cache reload.
* master: (137 commits) test: router upstream log to v2 config stubs (envoyproxy#6499) remove idle timeout validation (envoyproxy#6500) build: Change namespace of chromium_url. (envoyproxy#6506) coverage: exclude chromium_url (envoyproxy#6498) fix(tracing): allow 256 chars in path tag (envoyproxy#6492) Common: Introduce StopAllIteration filter status for decoding and encoding filters (envoyproxy#5954) build: update PGV url (envoyproxy#6495) subset lb: avoid partitioning host lists on worker threads (envoyproxy#6302) ci: Make envoy_select_quiche no-op. (envoyproxy#6393) watcher: notify when watched files are modified (envoyproxy#6215) stat: Add counterFromStatName(), gaugeFromStatName(), and histogramFromStatName() (envoyproxy#6475) bump to 1.11.0-dev (envoyproxy#6490) release: bump to 1.10.0 (envoyproxy#6489) hcm: path normalization. (#1) build: import manually minified Chrome URL lib. (envoyproxy#3) codec: reject embedded NUL in headers. (envoyproxy#2) Added veryfication if path contains query params and add them to path header (envoyproxy#6466) redis: basic integration test for redis_proxy (envoyproxy#6450) stats: report sample count as an integer to prevent loss of precision (envoyproxy#6274) Added VHDS protobuf message and updated RouteConfig to include it. (envoyproxy#6418) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Signed-off-by: Dmitri Dolguikh ddolguik@redhat.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description:
Risk Level: low
Testing:
Docs Changes:
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]