consul/agent/xds
Freddy 00b5b0a0a2
Update filter chain creation for sidecar/ingress listeners (#11245)
The duo of `makeUpstreamFilterChainForDiscoveryChain` and `makeListenerForDiscoveryChain` were really hard to reason about, and led to concealing a bug in their branching logic. There were several issues here:

- They tried to accomplish too much: determining filter name, cluster name, and whether RDS should be used. 
- They embedded logic to handle significantly different kinds of upstream listeners (passthrough, prepared query, typical services, and catch-all)
- They needed to coalesce different data sources (Upstream and CompiledDiscoveryChain)

Rather than handling all of those tasks inside of these functions, this PR pulls out the RDS/clusterName/filterName logic.

This refactor also fixed a bug with the handling of [UpstreamDefaults](https://www.consul.io/docs/connect/config-entries/service-defaults#defaults). These defaults get stored as UpstreamConfig in the proxy snapshot with a DestinationName of "*", since they apply to all upstreams. However, this wildcard destination name must not be used when creating the name of the associated upstream cluster. The coalescing logic in the original functions here was in some situations creating clusters with a `*.` prefix, which is not a valid destination.
2021-11-09 14:43:51 -07:00
..
proxysupport connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
testdata Update filter chain creation for sidecar/ingress listeners (#11245) 2021-11-09 14:43:51 -07:00
clusters.go Store GatewayKey in proxycfg snapshot for re-use 2021-11-01 13:58:53 -06:00
clusters_test.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
config.go Support Incremental xDS mode (#9855) 2021-04-29 13:54:05 -05:00
config_test.go Support Incremental xDS mode (#9855) 2021-04-29 13:54:05 -05:00
delta.go connect: remove support for Envoy 1.15 2021-09-22 11:48:50 -07:00
delta_test.go acl: remove id and revision from Policy constructors 2021-11-05 15:45:08 -04:00
endpoints.go xds: prefer fed state gateway definitions if they're fresher (#11522) 2021-11-09 16:45:36 +00:00
endpoints_test.go xds: prefer fed state gateway definitions if they're fresher (#11522) 2021-11-09 16:45:36 +00:00
envoy_versioning.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
envoy_versioning_test.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
failover_math.go xds: default to speaking xDS v3, but allow for v2 to be spoken upon request (#9658) 2021-02-26 16:23:15 -06:00
failover_math_test.go partition dicovery chains (#10983) 2021-09-07 16:29:32 -04:00
golden_test.go xds: default to speaking xDS v3, but allow for v2 to be spoken upon request (#9658) 2021-02-26 16:23:15 -06:00
listeners.go Update filter chain creation for sidecar/ingress listeners (#11245) 2021-11-09 14:43:51 -07:00
listeners_ingress.go Update filter chain creation for sidecar/ingress listeners (#11245) 2021-11-09 14:43:51 -07:00
listeners_test.go Update filter chain creation for sidecar/ingress listeners (#11245) 2021-11-09 14:43:51 -07:00
naming.go connect: generate the full SNI names for discovery targets in the compiler rather than in the xds package (#6340) 2019-08-19 13:03:03 -05:00
net_fallback.go xds: only try to create an ipv6 expose checks listener if ipv6 is supported by the kernel (#9765) 2021-02-19 14:38:43 -06:00
net_linux.go xds: only try to create an ipv6 expose checks listener if ipv6 is supported by the kernel (#9765) 2021-02-19 14:38:43 -06:00
protocol_trace.go Support Incremental xDS mode (#9855) 2021-04-29 13:54:05 -05:00
rbac.go Update spiffe ID patterns used for RBAC 2021-09-14 11:00:03 -06:00
rbac_test.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
resources.go Support Incremental xDS mode (#9855) 2021-04-29 13:54:05 -05:00
response.go Continue working through proxy and agent 2021-05-04 12:41:43 -07:00
routes.go Fix subtle loop bug and add test 2021-09-23 10:13:41 +01:00
routes_test.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
server.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
server_oss.go agent/structs: add a bunch more EnterpriseMeta helper functions to help with partitioning (#10669) 2021-07-22 13:20:45 -05:00
testing.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
xds.go Remove unused customEDSClusterJSON 2020-03-27 15:38:16 -04:00
xds_protocol_helpers_test.go connect: Remove support for Envoy 1.16 (#11354) 2021-10-27 18:51:35 -07:00
z_xds_packages.go xds: ensure that all envoyproxy/go-control-plane protobuf symbols are linked into the final binary (#10131) 2021-04-29 14:58:26 -05:00
z_xds_packages_test.go xds: ensure that all envoyproxy/go-control-plane protobuf symbols are linked into the final binary (#10131) 2021-04-29 14:58:26 -05:00