consul/agent/xds/testdata/clusters
Freddy 166a8b2a58
Only pass one hostname via EDS and prefer healthy ones (#8084)
Co-authored-by: Matt Keeler <mkeeler@users.noreply.github.com>

Currently when passing hostname clusters to Envoy, we set each service instance registered with Consul as an LbEndpoint for the cluster.

However, Envoy can only handle one per cluster:
[2020-06-04 18:32:34.094][1][warning][config] [source/common/config/grpc_subscription_impl.cc:87] gRPC config for type.googleapis.com/envoy.api.v2.Cluster rejected: Error adding/updating cluster(s) dc2.internal.ddd90499-9b47-91c5-4616-c0cbf0fc358a.consul: LOGICAL_DNS clusters must have a single locality_lb_endpoint and a single lb_endpoint, server.dc2.consul: LOGICAL_DNS clusters must have a single locality_lb_endpoint and a single lb_endpoint

Envoy is currently handling this gracefully by only picking one of the endpoints. However, we should avoid passing multiple to avoid these warning logs.

This PR:

* Ensures we only pass one endpoint, which is tied to one service instance.
* We prefer sending an endpoint which is marked as Healthy by Consul.
* If no endpoints are healthy we emit a warning and skip the cluster.
* If multiple unique hostnames are spread across service instances we emit a warning and let the user know which will be resolved.
2020-06-12 13:46:17 -06:00
..
connect-proxy-with-chain-and-failover.golden
connect-proxy-with-chain-and-overrides.golden
connect-proxy-with-chain-external-sni.golden
connect-proxy-with-chain.golden
connect-proxy-with-tcp-chain-double-failover-through-local-gateway-triggered.golden
connect-proxy-with-tcp-chain-double-failover-through-local-gateway.golden
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway-triggered.golden
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway.golden
connect-proxy-with-tcp-chain-failover-through-local-gateway-triggered.golden
connect-proxy-with-tcp-chain-failover-through-local-gateway.golden
connect-proxy-with-tcp-chain-failover-through-remote-gateway-triggered.golden
connect-proxy-with-tcp-chain-failover-through-remote-gateway.golden
custom-limits-max-connections-only.golden
custom-limits-set-to-zero.golden
custom-limits.golden
custom-local-app.golden
custom-timeouts.golden
custom-upstream-default-chain.golden
custom-upstream.golden
defaults.golden
expose-paths-grpc-new-cluster-http1.golden
expose-paths-local-app-paths.golden
expose-paths-new-cluster-http2.golden
ingress-gateway-no-services.golden
ingress-gateway.golden
ingress-multiple-listeners-duplicate-service.golden Support multiple listeners referencing the same service in gateway definitions 2020-05-06 15:06:13 -05:00
ingress-splitter-with-resolver-redirect.golden
ingress-with-chain-and-failover.golden
ingress-with-chain-and-overrides.golden
ingress-with-chain-external-sni.golden
ingress-with-chain.golden
ingress-with-tcp-chain-double-failover-through-local-gateway-triggered.golden
ingress-with-tcp-chain-double-failover-through-local-gateway.golden
ingress-with-tcp-chain-double-failover-through-remote-gateway-triggered.golden
ingress-with-tcp-chain-double-failover-through-remote-gateway.golden
ingress-with-tcp-chain-failover-through-local-gateway-triggered.golden
ingress-with-tcp-chain-failover-through-local-gateway.golden
ingress-with-tcp-chain-failover-through-remote-gateway-triggered.golden
ingress-with-tcp-chain-failover-through-remote-gateway.golden
mesh-gateway-ignore-extra-resolvers.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
mesh-gateway-no-services.golden
mesh-gateway-service-subsets.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
mesh-gateway-service-timeouts.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
mesh-gateway-using-federation-states.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
mesh-gateway.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
splitter-with-resolver-redirect.golden
terminating-gateway-hostname-service-subsets.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
terminating-gateway-ignore-extra-resolvers.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
terminating-gateway-no-services.golden Add xds cluster/listener/endpoint management 2020-04-27 11:08:40 -06:00
terminating-gateway-service-subsets.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00
terminating-gateway.golden Only pass one hostname via EDS and prefer healthy ones (#8084) 2020-06-12 13:46:17 -06:00