Commit Graph

167 Commits

Author SHA1 Message Date
Chengyuan Zhang 06dd24e248
xds: integrate CDS protocol in XdsClient (#6416)
Add CDS protocol integration into XdsClient. gRPC client interacts with XdsClient for CDS results via adding a cluster watcher to receive cluster information from traffic director. Multiple watchers can exist to receive cluster information for the same or different clusters.
2019-12-02 13:57:36 -08:00
sanjaypujare 7b6ab2558c
xds: Implementation of SdsSslContextProvider using SdsClient (#6444) 2019-11-27 15:17:12 -08:00
Jihun Cho 09d5093295
xds: simplify condition (#6463) 2019-11-25 13:22:38 -08:00
Jihun Cho 7db873f1f6
Roll-forward of stub,compiler: generated stub extends Abstract{Async,Future,Blocking}Stub #6196 (#6458)
This reverts commit 2eb3f8c34e (#6317).
2019-11-25 09:41:16 -08:00
Chengyuan Zhang 0a0d9f6684
xds: integrate EDS protocol into XdsClient (#6370)
This change implements EDS protocol in XdsClient, which requests for endpoint information for a given cluster for gRPC's load balancing usage. Note EDS is a quasi-incremental protocol, which means each response may contain only a subset of present resources. Absence of resources should be revealed by response timeout. Currently, timeout is not implemented, endpoint watchers will wait indefinitely if endpoints for the cluster interested in does not exist.
2019-11-24 23:35:58 -08:00
ZHANG Dapeng 81efecd86a
remove getLoadStatsStore method from LocalityStore
Currently `LoadStatsStore` is create by `LocalityStore` and `LoadReportClient` retrieves `LoadStatsStore` from `LocalityStore.getLoadStatsStore()`.

But `LocalityStore` is create by EDS policy, whereas `LoadReportClient` and `LoadStatsStore` should be created by CDS (if not EDS-only), before `LocalityStore` is created. If `LoadReportClient` is embedded in `XdsClientImpl`, it need a `LoadStatsStore` which shouldn't be created by `LocalityStore`.

Instead, `LoadStatsStore` should be create before `LocalityStore` is created, and be passed to `LocalityStore`'s constructor. A getter is not needed.
2019-11-21 12:37:48 -08:00
Jihun Cho eaf99cf7fe
core,xds: add missing JUnit RunWith annotation (#6457) 2019-11-21 11:52:34 -08:00
Chengyuan Zhang c2d68039ba
xds: implement LDS/RDS over ADS in XdsClient (#6320)
Implement envoy's LDS and RDS protocols in XdsClient. gRPC has a special purpose xDS resolver to instantiate an XdsClient object and add a watcher to initiate xDS communication with management server to retrieve information used in service config, which configures gRPC's load balancing plugin.
2019-11-20 00:43:08 -08:00
ZHANG Dapeng 17c3e48240
xds: refactor to eliminate LookasideChannelLb
This is a followup of #6425 to further refactor/cleanup. Now that `LookasideChannelLb` does very little thing, it does not need to be a class anymore.
2019-11-19 17:46:43 -08:00
Chengyuan Zhang c7a6f62831
xds: add gRPC-Java build version into Node parsed for xDS protocol (#6443) 2019-11-19 14:14:18 -08:00
Chengyuan Zhang 86bfefdaf2
api, core: make channel logger accessible through NameResolver.Args (#6430) 2019-11-18 16:33:39 -08:00
ZHANG Dapeng bd1f819024
xds: add an Attributes for XdsClient reference 2019-11-18 15:20:38 -08:00
sanjaypujare b05ce13df2
xds: implementation of SdsClient to be used by SDS based SslContextProviders (#6400) 2019-11-18 10:36:42 -08:00
Chengyuan Zhang a49bd6efaa
xds: do not globally cache results of reading bootstrap file (#6420)
Do not cache content read from bootstrap file. Each call of readBootstrap() should just trigger reading file explicitly.
2019-11-14 17:04:34 -08:00
ZHANG Dapeng 194d1512c0
xds: refactor xds policy to use XdsClient
This is a refactor of the existing xds policy to use XdsClient. It does neither create a copy of EDS policy as in #6371 nor re-implement an EDS policy. This should be similar to the idea of https://github.com/grpc/grpc/pull/20368 in C-core. 

Here it refactors `XdsComms2` to an implementation of `XdsClient`, which can be drop-in replaced by `XdsClientImp` when it's available.
2019-11-14 15:10:44 -08:00
sanjaypujare 80c78ddede
xds: add inline bytes support to CertificationValidationContext we use in SdsTrustManagerFactory (#6429) 2019-11-14 10:51:42 -08:00
Chengyuan Zhang b38134eebd
xds: add APIs for initiating LRS in XdsClient (#6419) 2019-11-13 16:05:36 -08:00
ZHANG Dapeng ce2b0174b2
xds: ignore endpoints with health_status != HEALTHY or UNKNOWN
Let child balancer (currently is Round Robin) handle the address list with only healthy addresses for its locality. If no healthy address available, let the child balancer handleNameResolutionError.
2019-11-12 13:40:25 -08:00
ZHANG Dapeng 6d3fb53128
xds: not use Immutable collections in method signature 2019-11-07 15:18:59 -08:00
ZHANG Dapeng b38d3ee571
all: remove unnecessary SuppressWarnings 2019-11-06 15:20:04 -08:00
Chengyuan Zhang 794517a7c3
xds: modify XdsClient interface and define data to be used by gRPC client from xDS responses (#6390)
This change completes the definition of XdsClient interface and fill the content of data types passing from XdsClient to each resource watcher.
2019-11-05 23:59:04 -08:00
sanjaypujare 6d51163933
xds: use ReferenceCountingSslContextProviderMap in TlsContextManager for clients and servers (#6385) 2019-11-04 17:32:48 -08:00
Chengyuan Zhang 44c4fee95b
xds: build channel to xDS server with GoogleDefaultChannelBuilder if bootstrap file specifies so (#6362)
This change adds support to build channel to xDS server with Google Default Credentials based on bootstrap file's "channel_creds" field.
2019-11-03 16:12:20 -08:00
ZHANG Dapeng 97d4fa6614
xds: fix lint warning for throwing RuntimeException 2019-11-01 16:52:24 -07:00
Chengyuan Zhang c931c87430
xds: refactor gRPC's data types for envoy proto messages (#6361)
This change cleans up the definitions of gRPC's data types for envoy's proto messages. These data types carry only information needed for gRPC's logic extracted from envoy's proto messages. Each data type has a static method to convert from its corresponding envoy's proto.
2019-11-01 10:08:20 -07:00
sanjaypujare b1eb48a910
xds: reference counting map for SslContextProvider needed for TlsContextManager (#6350) 2019-10-31 10:40:19 -07:00
Chengyuan Zhang 39af8690a7
xds: refactor Bootstrapper implementation to be more use friendly (#6339)
Existing Bootstrapper is an eagerly loaded singleton and reading bootstrap file is done when first time referencing Boostrapper class. This is not use friendly for error propagation.
This change added an instance method Bootstrapper#readBootstrap() for reading the bootstrap file. Instead of making the Bootstrapper instance a singleton, make the bootstrap data (aka, BootstrapInfo) a singleton. Now reading the bootstrap file happens when the first Bootstrapper instance first time calling Bootstrapper#readBootstrap().
2019-10-30 12:14:00 -07:00
sanjaypujare d04529256a
xds: rename SecretProvider to SslContextProvider and make it non-generic (#6349) 2019-10-29 11:25:10 -07:00
sanjaypujare d6b64bbf80
xds: add sds.proto to imported envoy proto files (#6346) 2019-10-28 15:51:27 -07:00
Chengyuan Zhang c66c26805f
xds: define XdsClient interface (#6303)
Defines an XdsClient interface, which is the blueprint for the class that encapsulates all of the logic for communicating with the xDS server. Also defines watcher interfaces for watching CDS/EDS updates.
2019-10-24 16:46:20 -07:00
sanjaypujare 48b41dce9e
xds: Client and server proto negotiators and handlers added to SdsProtocolNegotiators (#6319) 2019-10-24 15:27:53 -07:00
ZHANG Dapeng b009e92156
xds: Bump perfmark to 0.19.0
Resolves #6217
2019-10-22 16:55:39 -07:00
Jihun Cho 2eb3f8c34e
stub,compiler: Rollback Abstract{Future,Blocking,Async}Stub (#6317)
rollback of #6304 & #6196
2019-10-22 13:27:30 -07:00
sanjaypujare ed845991db
xds: remove unused SecretManager code based on separate TlsCertificate and CertificateValidationContext secrets (#6310) 2019-10-21 16:45:45 -07:00
ZHANG Dapeng 13fad99549
xds: remove gogoproto dependency
Since e7f0b7176e and 1dd72ab043 , gogoproto is not a dependency anymore.
2019-10-21 15:42:27 -07:00
sanjaypujare f07fcd7d7b
xds: TlsContextManager refactoring to match its usage; add tests for TlsContextManager (#6297) 2019-10-21 15:07:35 -07:00
ZHANG Dapeng 5cb67d6399
xds: remove invalid srcDir third_party/protoc-gen-validate/src/main/proto
The directory third_party/protoc-gen-validate/src/main/proto was removed in #6177.
2019-10-21 14:24:17 -07:00
Chengyuan Zhang 9dce879742
xds: add fields for EDS server and LRS server in XdsConfig (#6287) 2019-10-18 13:33:56 -07:00
Chengyuan Zhang c0f91efffb
xds: import http_connection_manager proto from envoy repo (#6301) 2019-10-18 11:00:11 -07:00
Chengyuan Zhang b5ddf3ef08
xds: import proto files for CDS, LDS, RDS from envoy repo (#6292) 2019-10-17 18:29:07 -07:00
Chengyuan Zhang 1dd72ab043
xds: update envoy proto version to f709434b37e9ff74666d5b854aa11fb2f1ec37f3 (#6291) 2019-10-17 17:23:40 -07:00
Jihun Cho 45d49a56cc
stub,compiler: generated stub extends Abstract{Async,Future,Blocking}Stub (#6196) 2019-10-17 14:49:24 -07:00
Jihun Cho 9a34ceece6
xds: fix lint warnings (#6289) 2019-10-16 16:50:03 -07:00
sanjaypujare 8d1ee9cfc7
xds: implementation of SslContextSecretVolumeSecretProvider (#6251) 2019-10-16 15:15:28 -07:00
sanjaypujare 4fc41bd0e1
xds: SdsTrustManagerFactory implementation - uses SdsX509TrustManager (#6267) 2019-10-16 14:35:49 -07:00
sanjaypujare ddaf1c8ce9
xds: fix to use the resource based TestUtils.loadCert (#6281) 2019-10-15 17:32:45 -04:00
Ran 58886310e4
xds: disable test that break on blaze. (#6275) 2019-10-11 14:16:47 -07:00
sanjaypujare ab092ec43c
xds: disables some tests that break with blaze (#6273) 2019-10-11 11:40:11 -07:00
sanjaypujare 0c4fc64bf2
xds: first installment of SdsProtocolNegotiators with Client and Server builders (#6261)
* xds: SdsProtocolNegotiators with Client and Server builders
2019-10-10 16:38:27 -07:00
Ran a94a63c7ae
xds: clean up. (#6271) 2019-10-10 16:18:09 -07:00