open-consul/agent/xds/testdata/clusters
Derek Menteer 9e76d274ec
Fix mesh gateway configuration with proxy-defaults (#15186)
* Fix mesh gateway proxy-defaults not affecting upstreams.

* Clarify distinction with upstream settings

Top-level mesh gateway mode in proxy-defaults and service-defaults gets
merged into NodeService.Proxy.MeshGateway, and only gets merged with
the mode attached to an an upstream in proxycfg/xds.

* Fix mgw mode usage for peered upstreams

There were a couple issues with how mgw mode was being handled for
peered upstreams.

For starters, mesh gateway mode from proxy-defaults
and the top-level of service-defaults gets stored in
NodeService.Proxy.MeshGateway, but the upstream watch for peered data
was only considering the mesh gateway config attached in
NodeService.Proxy.Upstreams[i]. This means that applying a mesh gateway
mode via global proxy-defaults or service-defaults on the downstream
would not have an effect.

Separately, transparent proxy watches for peered upstreams didn't
consider mesh gateway mode at all.

This commit addresses the first issue by ensuring that we overlay the
upstream config for peered upstreams as we do for non-peered. The second
issue is addressed by re-using setupWatchesForPeeredUpstream when
handling transparent proxy updates.

Note that for transparent proxies we do not yet support mesh gateway
mode per upstream, so the NodeService.Proxy.MeshGateway mode is used.

* Fix upstream mesh gateway mode handling in xds

This commit ensures that when determining the mesh gateway mode for
peered upstreams we consider the NodeService.Proxy.MeshGateway config as
a baseline.

In absense of this change, setting a mesh gateway mode via
proxy-defaults or the top-level of service-defaults will not have an
effect for peered upstreams.

* Merge service/proxy defaults in cfg resolver

Previously the mesh gateway mode for connect proxies would be
merged at three points:

1. On servers, in ComputeResolvedServiceConfig.
2. On clients, in MergeServiceConfig.
3. On clients, in proxycfg/xds.

The first merge returns a ServiceConfigResponse where there is a
top-level MeshGateway config from proxy/service-defaults, along with
per-upstream config.

The second merge combines per-upstream config specified at the service
instance with per-upstream config specified centrally.

The third merge combines the NodeService.Proxy.MeshGateway
config containing proxy/service-defaults data with the per-upstream
mode. This third merge is easy to miss, which led to peered upstreams
not considering the mesh gateway mode from proxy-defaults.

This commit removes the third merge, and ensures that all mesh gateway
config is available at the upstream. This way proxycfg/xds do not need
to do additional overlays.

* Ensure that proxy-defaults is considered in wc

Upstream defaults become a synthetic Upstream definition under a
wildcard key "*". Now that proxycfg/xds expect Upstream definitions to
have the final MeshGateway values, this commit ensures that values from
proxy-defaults/service-defaults are the default for this synthetic
upstream.

* Add changelog.

Co-authored-by: freddygv <freddy@hashicorp.com>
2022-11-09 10:14:29 -06:00
..
connect-proxy-exported-to-peers.latest.golden xds: begin refactor to always pass test snapshots through all xDS types (#13461) 2022-06-15 14:58:28 -05:00
connect-proxy-lb-in-resolver.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-chain-and-failover-to-cluster-peer.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
connect-proxy-with-chain-and-failover.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-chain-and-overrides.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-chain-and-redirect-to-cluster-peer.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
connect-proxy-with-chain-external-sni.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-chain.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-peered-upstreams.latest.golden Update max_ejection_percent on outlier detection for peered clusters to 100% (#14373) 2022-08-29 13:46:41 -04:00
connect-proxy-with-tcp-chain-double-failover-through-local-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-double-failover-through-local-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-double-failover-through-remote-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-failover-through-local-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-failover-through-local-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-failover-through-remote-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tcp-chain-failover-through-remote-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
connect-proxy-with-tls-outgoing-cipher-suites.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-tls-outgoing-max-version.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-tls-outgoing-min-version-auto.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
connect-proxy-with-tls-outgoing-min-version.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-limits-max-connections-only.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-limits-set-to-zero.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-limits.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-local-app.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-max-inbound-connections.latest.golden Add connection limit setting to service defaults 2022-05-24 10:13:38 -07:00
custom-passive-healthcheck.latest.golden Add additional parameters to envoy passive health check config (#14238) 2022-09-01 09:59:11 -07:00
custom-timeouts.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-upstream-default-chain.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
custom-upstream.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
defaults.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
downstream-service-with-unix-sockets.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
expose-paths-grpc-new-cluster-http1.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
expose-paths-local-app-paths.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
expose-paths-new-cluster-http2.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-gateway-nil-config-entry.latest.golden ingress-gateways: don't log error when registering gateway (#15001) 2022-10-25 10:55:44 -07:00
ingress-gateway-no-services.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-gateway-with-tls-outgoing-cipher-suites.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-gateway-with-tls-outgoing-max-version.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-gateway-with-tls-outgoing-min-version.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-gateway.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-lb-in-resolver.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-multiple-listeners-duplicate-service.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-splitter-with-resolver-redirect.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-with-chain-and-failover-to-cluster-peer.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
ingress-with-chain-and-failover.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-chain-external-sni.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-with-chain.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
ingress-with-defaults-service-max-connections.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
ingress-with-overwrite-defaults-service-max-connections.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
ingress-with-service-max-connections.latest.golden Make the mesh gateway changes to allow `local` mode for cluster peering data plane traffic (#14817) 2022-10-06 09:54:14 -04:00
ingress-with-tcp-chain-double-failover-through-local-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-double-failover-through-local-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-double-failover-through-remote-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-double-failover-through-remote-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-failover-through-local-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-failover-through-local-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-failover-through-remote-gateway-triggered.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
ingress-with-tcp-chain-failover-through-remote-gateway.latest.golden Refactor failover code to use Envoy's aggregate clusters (#14178) 2022-08-12 14:30:46 -04:00
local-mesh-gateway-with-peered-upstreams.latest.golden Fix mesh gateway configuration with proxy-defaults (#15186) 2022-11-09 10:14:29 -06:00
mesh-gateway-hash-lb-ignored.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-ignore-extra-resolvers.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-no-services.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-non-hash-lb-injected.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-peering-control-plane.latest.golden Update xds generation for peering over mesh gws 2022-10-03 12:42:27 -06:00
mesh-gateway-service-subsets.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-service-timeouts.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-tcp-keepalives.latest.golden Update docs and add tcp_keepalive_probes setting 2022-10-14 17:05:46 -07:00
mesh-gateway-using-federation-states.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
mesh-gateway-with-exported-peered-services-http-with-router.latest.golden state: prohibit exported discovery chains to have cross-datacenter or cross-partition references (#13726) 2022-07-12 11:03:41 -05:00
mesh-gateway-with-exported-peered-services-http.latest.golden xds: mesh gateways now correctly load up peer-exported discovery chains using L7 protocols (#13624) 2022-06-28 14:52:25 -05:00
mesh-gateway-with-exported-peered-services.latest.golden xds: mesh gateways now correctly load up peer-exported discovery chains using L7 protocols (#13624) 2022-06-28 14:52:25 -05:00
mesh-gateway-with-imported-peered-services.latest.golden fix bug that resulted in generating Envoy configs that use CDS with an EDS configuration (#15140) 2022-10-25 14:49:57 -04:00
mesh-gateway-with-peer-through-mesh-gateway-enabled.latest.golden feat: xDS updates for peerings control plane through mesh gw 2022-10-07 08:46:42 -06:00
mesh-gateway.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
splitter-with-resolver-redirect.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-hostname-service-subsets.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-http2-upstream-subsets.latest.golden Respect http2 protocol for upstreams of terminating gateways 2022-07-08 14:30:45 -07:00
terminating-gateway-http2-upstream.latest.golden Respect http2 protocol for upstreams of terminating gateways 2022-07-08 14:30:45 -07:00
terminating-gateway-ignore-extra-resolvers.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-lb-config.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-no-services.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-service-subsets.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-sni.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
terminating-gateway-tcp-keepalives.latest.golden Extend tcp keepalive settings to work for terminating gateways as well 2022-10-14 17:05:46 -07:00
terminating-gateway.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
transparent-proxy-catalog-destinations-only.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
transparent-proxy-destination-http.latest.golden Tgtwy egress HTTP support (#13953) 2022-08-01 14:12:43 -04:00
transparent-proxy-destination.latest.golden feat: convert destination address to slice 2022-07-25 12:31:58 -04:00
transparent-proxy-dial-instances-directly.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00
transparent-proxy-terminating-gateway-destinations-only.latest.golden fix: ipv4 destination dns resolution 2022-08-01 16:45:57 -04:00
transparent-proxy-with-peered-upstreams.latest.golden Update max_ejection_percent on outlier detection for peered clusters to 100% (#14373) 2022-08-29 13:46:41 -04:00
transparent-proxy.latest.golden connect: Add Envoy 1.21.1 to support matrix, remove 1.17.4 (#12777) 2022-04-14 10:44:42 -07:00