open-consul/agent/xds/testdata/clusters
Freddy 66e2def461
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 Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-chain-and-overrides.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-chain-external-sni.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-chain.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-double-failover-through-local-gateway-triggered.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-double-failover-through-local-gateway.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway-triggered.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-failover-through-local-gateway-triggered.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-failover-through-local-gateway.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-failover-through-remote-gateway-triggered.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
connect-proxy-with-tcp-chain-failover-through-remote-gateway.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-limits-max-connections-only.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-limits-set-to-zero.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-limits.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-local-app.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-timeouts.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-upstream-default-chain.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
custom-upstream.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
defaults.golden Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
expose-paths-grpc-new-cluster-http1.golden proxycfg: support path exposed with non-HTTP2 protocol (#7510) 2020-04-02 09:35:04 +02:00
expose-paths-local-app-paths.golden Expose HTTP-based paths through Connect proxy (#6446) 2019-09-25 20:55:52 -06:00
expose-paths-new-cluster-http2.golden Expose HTTP-based paths through Connect proxy (#6446) 2019-09-25 20:55:52 -06:00
ingress-gateway-no-services.golden Ingress Gateways for TCP services (#7509) 2020-04-16 14:00:48 -07:00
ingress-gateway.golden Ingress Gateways for TCP services (#7509) 2020-04-16 14:00:48 -07:00
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 Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-chain-and-failover.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-chain-and-overrides.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-chain-external-sni.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-chain.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-double-failover-through-local-gateway-triggered.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-double-failover-through-local-gateway.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-double-failover-through-remote-gateway-triggered.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-double-failover-through-remote-gateway.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-failover-through-local-gateway-triggered.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-failover-through-local-gateway.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-failover-through-remote-gateway-triggered.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
ingress-with-tcp-chain-failover-through-remote-gateway.golden Add all the xds ingress tests 2020-04-24 09:31:32 -05:00
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 agent: allow mesh gateways to initialize even if there are no connect services registered yet (#6576) 2019-10-17 16:46:49 -05:00
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 Allow configuration of upstream connection limits in Envoy (#6829) 2019-12-03 14:13:33 -06:00
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