api: xDS API version specifier#9468
Conversation
Signed-off-by: shikugawa <rei@tetrate.io>
| // [#next-free-field: 7] | ||
| message ConfigSource { | ||
| enum XdsApiVersion { | ||
| // set api version automatically, default version is set as v2. |
There was a problem hiding this comment.
I'm wondering whether this should be match the version of ConfigSource, i.e. if the type is v3alpha.ConfigSource, use v3alpha. WDYT @htuch?
There was a problem hiding this comment.
Making it explicit (as done in this PR) has the advantage that we can support mixed v2/v3 configurations, e.g. LDS loads from a v3 server but RDS comes from v2. We may get into a situation where a v3 Listener one day is expecting to have some v3-related route table delivered, but I think we can enforce these through consistency checking at config ingestion, the general case is that we support mixed.
There was a problem hiding this comment.
To be clear, I meant this for AUTO, we should definitely keep the rest of options explicit.
There was a problem hiding this comment.
Yeah, I think that would be reasonable semantics.
There was a problem hiding this comment.
I think let's just say that it's V2 for now, it would be ideal to have folks specifically exactly what they are after going forward, and this will encourage that.
htuch
left a comment
There was a problem hiding this comment.
This is great @Shikugawa, definitely aligned with where I'm thinking. For this PR, I would suggest you get the build working and existing tests passing. You can skip adding new tests for v3 for now, I'll sync after some more PRs have landed and we can discuss the v3 tests. In my WiP banch, I have some support for testing with mixed v2/v3.
| // [#next-free-field: 7] | ||
| message ConfigSource { | ||
| enum XdsApiVersion { | ||
| // set api version automatically, default version is set as v2. |
There was a problem hiding this comment.
Making it explicit (as done in this PR) has the advantage that we can support mixed v2/v3 configurations, e.g. LDS loads from a v3 server but RDS comes from v2. We may get into a situation where a v3 Listener one day is expecting to have some v3-related route table delivered, but I think we can enforce these through consistency checking at config ingestion, the general case is that we support mixed.
|
FYI, when #9480 lands, we'll need to use those annotations for the type URLs in this PR. |
|
@Shikugawa any update here? Would be great to land this soon so we can work on v3 wire xDS. |
|
@htuch there is no update here, but build is failing on CI. This should be resolved, my local build process can work fine so It seems something wrong on CI build process. |
|
@Shikugawa looking at the CI logs, I'm guessing this might be some interaction with the package movement that @lizan added for SRDS, see https://dev.azure.com/cncf/envoy/_build/results?buildId=24529&view=logs&j=4e3e56d1-4574-5496-ade8-f4f41cead1dc&t=481a44f5-6d65-59dc-f824-e3a9563c67cf. |
Signed-off-by: shikugawa <rei@tetrate.io>
htuch
left a comment
There was a problem hiding this comment.
@Shikugawa this LGTM modulo nits and some tests. I think we just need to validate the correspondence between presented ConfigSource version and the type URL that gets used. Thanks.
/wait
| // [#next-free-field: 7] | ||
| message ConfigSource { | ||
| enum XdsApiVersion { | ||
| // set api version automatically, default version is set as v2. |
There was a problem hiding this comment.
I think let's just say that it's V2 for now, it would be ideal to have folks specifically exactly what they are after going forward, and this will encourage that.
Signed-off-by: shikugawa <rei@tetrate.io>
Signed-off-by: shikugawa <rei@tetrate.io>
…fier Signed-off-by: shikugawa <rei@tetrate.io>
Signed-off-by: shikugawa <rei@tetrate.io>
fe7d23b to
4ab383d
Compare
htuch
left a comment
There was a problem hiding this comment.
Thanks @Shikugawa. I'm going to merge this as is to unblock other v3 works, please do add some unit tests (I'm going to be adding integration tests shortly as well).
This PR extends envoyproxy#9468 to support a distinct notion of transport and resource API version. The intuition here is that the opaque resources (and their type URLs) can be delivered via either v2 or v3 xDS, and the DiscoveryRequest etc. messages have their own versioning. Currently, the v2 and v3 transport protocols are indistinguishable modulo service endpoint. As v3 evolves, e.g. with envoyproxy#9301, differences will be introduced. At this point it will be necessary to have enhanced support in the gRPC mux and HTTP subscription modules to handle the protocol differences. This is technically a breaking v2 API change, but since the field it breaks was only added today, I think it's safe to assume it is not in use yet. Risk level: Low Testing: Integration tests added to validate service endpoint and type URL selection based on transport/resource version. Signed-off-by: Harvey Tuch <htuch@google.com>
It enables to specify API versioning for xDS for envoyproxy#8421, allow to write like this config eds_cluster_config: eds_config: version: V2 api_config_source: api_type: GRPC grpc_services: envoy_grpc: cluster_name: eds_cluster Risk Level: Low Testing: unit test(maybe it is needed to add integration test) Signed-off-by: shikugawa <rei@tetrate.io> Signed-off-by: Prakhar <prakhar_au@yahoo.com>
This PR extends #9468 to support a distinct notion of transport and resource API version. The intuition here is that the opaque resources (and their type URLs) can be delivered via either v2 or v3 xDS, and the DiscoveryRequest etc. messages have their own versioning. Currently, the v2 and v3 transport protocols are indistinguishable modulo service endpoint. As v3 evolves, e.g. with #9301, differences will be introduced. At this point it will be necessary to have enhanced support in the gRPC mux and HTTP subscription modules to handle the protocol differences. This is technically a breaking v2 API change, but since the field it breaks was only added today, I think it's safe to assume it is not in use yet. Risk level: Low Testing: Integration tests added to validate service endpoint and type URL selection based on transport/resource version. Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: shikugawa rei@tetrate.io
Description: It enables to specify API versioning for xDS for #8421, allow to write like this config
Risk Level: Low
Testing: unit test(maybe it is needed to add integration test)
Docs Changes: needed
Release Notes:
[Optional Fixes #Issue]
[Optional Deprecated:]