deprecate config using the One True ADS Server(tm)
#13 951 ouverte le 10 nov. 2020
Métriques du dépôt
- Stars
- (27 997 stars)
- Métriques de merge PR
- (Merge moyen 8j) (378 PRs mergées en 30 j)
Description
Today, the way ADS is configured is as follows:
- The bootstrap file has an
ads_configfield indicating the One True ADS Server(tm). - The bootstrap file has its
lds_resource_locatorandcds_resources_locatorfields set to aConfigSourcewith theadsfield set. - In resources sent from the management server,
ConfigSourceprotos use the sameadsfield.
This approach seems incompatible with the new xDS naming scheme, which was designed to support federation. As part of the new naming scheme, the ApiConfigSource.ApiType enum now has AGGREGATED_GRPC and AGGREGATED_DELTA_GRPC values, which allows configuring any ConfigSource to use a single ADS stream instead of using a separate stream for each resource type. This way of configuring ADS seems much more in-line with the direction we're heading in and will make it easier to transition to the new federated world.
Therefore, I propose replacing this notion of the One True ADS Server(tm) with use of this new AGGREGATED_GRPC enum value. The typical ADS configuration described above would instead be represented as follows:
- The bootstrap file will not populate the
ads_configfield. - The bootstrap file will have its
lds_resource_locatorandcds_resources_locatorfields both set to the same server, withApiTypeset toAGGREGATED_GRPCorAGGREGATED_DELTA_GRPC. (Envoy will internally de-dup these by hashing theConfigSources, so the result will be a single ADS stream, not two separate ADS streams.) - In resources sent from the management server,
ConfigSourceprotos will use theselffield.
This will require the following changes:
- Implement support for the
selffield. (This field was added in #8201 but is not currently implemented in Envoy.) - Implement support for the
AGGREGATED_GRPCandAGGREGATED_DELTA_GRPCvalues in theApiTypeenum. (I'm not sure how much of this works right now.) - Deprecate the bootstrap file's
ads_configfield. - Deprecate the
adsfield.
The only configuration that would be broken by this change would be if someone was (e.g.) using non-aggregated LDS to get a Listener resource that contained a ConfigSource telling the client to get the RouteConfiguration via the One True ADS Server(tm). However, it seems exceedingly unlikely that anyone is actually doing that, and there are work-arounds: they can either have their management server send the exact ConfigSource containing the ADS server they want to talk to, or better yet, they can start using the new xDS naming scheme, where they can select the xDS server via an authority in the resource name itself.
CC @mattklein123 @htuch