Commit Graph

339 Commits

Author SHA1 Message Date
sanjaypujare 06ca927a64
xds: first part of MeshCaCertificateProvider (#7247) 2020-07-29 09:10:02 -07:00
ZHANG Dapeng 784e804259
xds: refactor usage of Node in Bootstrap to EnvoyProtoData.Node
In preparation for xds-v3 support.
2020-07-28 08:56:41 -07:00
ZHANG Dapeng 7949f65e0f
xds: remove GRPC_XDS_EXPERIMENTAL_ROUTING flag 2020-07-28 08:03:46 -07:00
Ran 61fd6d3ecd
xds: fix missing @RunWith annotation. (#7245) 2020-07-23 12:58:24 -07:00
sanjaypujare c60f5ff95b
xds: implement STS based OAuth 2.0 credentials exchange (#7232) 2020-07-22 16:36:38 -07:00
Chengyuan Zhang e4215b422d
xds: routing policy should immediately update a picker that selects base on updated config (#7233)
The routing LB policy should immediately the Channel's picker that delegates picking to the updated routes. Otherwise, new RPCs will keep being sent through old routes even if they are removed. This change also includes the fix for syncing state change for child balancers in deactivated state.
2020-07-22 01:16:51 -07:00
Chengyuan Zhang 9f49e48237
xds: support load reporting all clusters option and fix actual report interval measurement (#7209)
- Add support for send_all_clusters field in LRS response. When it is set to true, just send load reports for clusters that the client is currently tracking (aka, is sending load to).

- The actual load report interval (in each ClusterStats message, which contains the stats for each cluster:eds_service) should be tracked individually.
2020-07-21 18:03:36 -07:00
Chengyuan Zhang 1e238ee2a0
xds: add header matching special cases for hiding/exposing some gRPC headers (#7224)
Expose "content-type" header (hard-coded) at header matching, pretend it's already there.
2020-07-21 18:02:29 -07:00
ZHANG Dapeng 4edbe245f1
xds: import v3 proto for ADS service 2020-07-20 13:42:57 -07:00
Chengyuan Zhang b9d067677c
xds: implement the top-level LB policy (#7203)
The top-level LB policy, which is an aggregator for CDS policies. It maintains the lifecycle of CDS LB policy instances. The pick argument taken from the Channel contains the information to determine which child CDS policy instance should the picking operation be delegated to.

The implementation is similar to the action part of what we currently have in the routing policy. The existing routing policy will be refactored to two parts, with the route match part moved into ConfigSelector and action part being this top-level LB policy.
2020-07-20 12:12:59 -07:00
ZhenLian e7cd2299c4
xds: change package name for CEL lib (#7235) 2020-07-17 19:46:51 -07:00
sanjaypujare 8ab2c75150
xds: fix DistributorWatcher to send last updates to newly added watchers (#7220) 2020-07-17 11:58:30 -07:00
Chengyuan Zhang 92f4842f0f
xds: perform header matching on concatenated values (#7215)
Combine values of header fields with the same key to a comma-separated string before performing header matching.
2020-07-15 14:06:02 -07:00
sanjaypujare 7047209ba3
xds: add meshca.proto from Istio repo (#7213) 2020-07-15 10:46:14 -07:00
ZHANG Dapeng bacd12ee0a
xds: delete deprecated xds-experimental scheme 2020-07-14 16:46:58 -07:00
Chengyuan Zhang 631e07f090
xds: fix lint (#7210) 2020-07-14 15:25:34 -07:00
cindyxue 47c6bfefe5
xds: Add a mock Cel library used for evaluation in Cel Engine (#7162)
* a mock Cel library used for authorization evaluation
2020-07-14 14:39:44 -07:00
sanjaypujare 016ff64a8b
xds: implement CertificateProviderRegistry & CertificateProviderStore (#7188) 2020-07-10 16:30:17 -07:00
ZHANG Dapeng cd70dcbfae
xds: fix lint 2020-07-08 17:21:16 -07:00
ZHANG Dapeng c756c2db56
xds: parse resources in ADS response to envoy-api v3 objects
Continuation of #7169 to parse all resources in ADS response to v3 objects. In this PR we still only send v2 requests to xDS server (No v3 bootstrap or env flag support).
2020-07-06 21:55:25 -07:00
sanjaypujare 2dc670163f
xds: convert and rename ReferenceCountingSslContextProviderMap to generic ReferenceCountingMap (#7181) 2020-07-06 18:08:25 -07:00
ZHANG Dapeng eaa98f8d91
xds: parse Listener update as xDS v3 resource
This is part of xDS v3 support as per go/grpc-xds-v3-support

In this PR:
- still only send v2 requests to xDS server (No v3 bootstrap or env flag support)
- parse Listener update as v3 proto
- Refactor SDS's Listener watcher to use enovy v3 API
- still parse other resources as v2 proto.
2020-07-06 10:25:46 -07:00
sanjaypujare e2de5f1a65
xds: 1st part of implementation of CertificateProvider for agentless (#7170) 2020-07-01 09:35:05 -07:00
Eric Anderson 2dab629a0a api: Deprecate ManagedChannelBuilder.nameResolverFactory
It has been our intention for years to remove nameResolverFactory. We should
make it clear to users to avoid new code depending on it and so they can tell
us why they need it so we can provide replacements.
2020-06-30 14:34:35 -05:00
cindyxue e42f96d02a
xds: import checked.proto from Googleapis' repository (#7160)
* Added CheckedExpr dependency
2020-06-30 12:03:21 -07:00
sanjaypujare d782f4689f
xds: use env variable and a boolean to enable xds security code (#7165) 2020-06-26 18:22:09 -07:00
Jihun Cho df54162ffd
all: fix lint warnings and errors (#7150) 2020-06-23 10:10:42 -07:00
sanjaypujare 8fb6591850
xds: disable processing of UpstreamTlsContext until we are ready to test the feature (#7148) 2020-06-22 14:33:41 -07:00
sanjaypujare 69191ffc47
xds: refactor to use BaseTlsContext and remove *Holder classes (#7147) 2020-06-22 09:57:46 -07:00
Chengyuan Zhang 43cf77de83
xds: implement routing policy with all supported types of matcher (#7130)
Implement xds_routing LB policy with all kinds of matchers (path, header, runtime faction) supported.
2020-06-19 16:55:49 -07:00
sanjaypujare ae7a482d9a
xds: replace UpstreamTlsContext with internal definition (#7145) 2020-06-19 16:41:21 -07:00
Chengyuan Zhang 3facda0130
xds: avoid pushing duplicate (CDS) resource data to watchers (#7143)
De-duplicate cluster update information pushed to cluster watchers.

This only applies to CDS as the management server sends a response with all requested clusters while only some of. them have changed (or newly been subscribed).

This does not apply to EDS as the protocol is incremental and each EDS response will only contain ClusterLoadAssignments for clusters whose endpoints have changed.

This does not apply to LDS and RDS as at any time we will subscribe to a single resource and our TD implementation will not send extra (unrequested) resources. So each time, the received responses always contain updated resource information.
2020-06-19 12:22:22 -07:00
sanjaypujare 57ae04007d
xds: use fallback PN if you get exception while retrieving SslContextProvider (#7137) 2020-06-18 10:08:39 -07:00
sanjaypujare e76e7c23a8
xds: replace Envoy's DownstreamTlsContext with internally defined DownstreamTlsContext (#7131) 2020-06-17 16:46:33 -07:00
ZHANG Dapeng 81138c51ad
xds: address filtering 2020-06-17 14:37:33 -07:00
cindyxue 40b815058f
xds: fix build.gradle for shadowing googleapis (#7121) 2020-06-12 17:10:13 -07:00
sanjaypujare 4077414e23
xds: update envoy and udpa to later versions to get agentless changes (#7122) 2020-06-12 09:44:40 -07:00
cindyxue 7f3a602255
xds: import rbac.proto from Envoy's repository (#7109) 2020-06-11 16:14:14 -07:00
Chengyuan Zhang 9cf4d02ce3 Propagate original error causing XdsClient stream closure to the Channel 2020-06-10 19:24:56 +00:00
Chengyuan Zhang c777e08563
xds: retain locality stats counter when the child balancer for that locality is deactivated (#7096)
Create the counter for recording per locality stats upon creating the child balancer for that locality. When the locality is deactivated (due to EDS response update removes it), the counter is not deleted from the LoadStatsStore. Delete it when the child balancer for that locality is shut down. In this way, the lifecycle of the load stats counter for a certain locality stays same with the child balancer for that locality. This is exactly what will happen after we refactor LocalityStore to PriorityLoadBalancer and LrsLoadBalancer (i.e., when some priority is deactivated, its subtree is not deleted immediately, so the LrsLoadBalancer instances for localities still hold the load stats counters).
2020-06-05 18:02:15 -07:00
sanjaypujare 2740901673
xds: add xDS v3 protos in preparation for agentless security (#7091) 2020-06-04 10:03:33 -07:00
Chengyuan Zhang c551fe3807
xds: implement xds_routing policy config generation and parsing (#7055)
Implemented service config generation in the xDS resolver with xds_routing that supports all matchers. Reimplemented xds_routing config parsing with all matchers. Existing implementation for xds_routing LB policy is mostly deleted for now, as we would need to reimplement the route matching logic with matchers added.
2020-06-04 02:03:49 -07:00
Elliotte Rusty Harold 417d7700dd
deps: Update guava to 29.0 (#7079) 2020-06-03 13:48:02 -07:00
Chengyuan Zhang 26cf60d8c7
xds: no longer use existing Subchannels after xDS resource becomes unavailable (#7081)
Put Channel into TRANSIENT_FAILURE when CDS/EDS resource that is currently being watched becomes unavailable. CDS/EDS LB policies should shut down their downstream policy instances (stop using current Subchannels for new RPCs) and propagate TRANSIENT_FAILURE status to their parent policies (and may eventually to the Channel).
2020-06-02 18:51:39 -07:00
Chengyuan Zhang 40991af27c
xds: return an empty service config to Channel when the requested xDS resource does not exist (or removed) (#7077) 2020-06-01 10:24:48 -07:00
Chengyuan Zhang e5443068f6
xds: fix lint warnings (#7074) 2020-05-31 17:33:27 -07:00
ZHANG Dapeng 0cb91d97bf
xds: implement priority lb 2020-05-29 12:47:46 -07:00
sanjaypujare 62620ccd00
xds: replace generic with individual client and server SslContextProviders (#7059) 2020-05-27 12:31:54 -07:00
Chengyuan Zhang 9c4fece661
xds: remove path matcher format requirements and default route requirement for routing enabled (#7063)
Remove requirement for formats of path matchers. Only require the last route to be the default route for the case when routing is disabled.
2020-05-27 10:20:31 -07:00
Chengyuan Zhang a86fc47c04
xds: change route data validation logic (#7047)
Changed the logic of parsing Route to skip Routes with action that specifies cluster_header. Eliminate unnecessary validation logic in XdsClientImpl, of which is already covered in converters.
2020-05-18 16:23:25 -07:00