Fix ClusterLoadAssignment timeouts dropping endpoints.
When a large number of upstreams are configured on a single envoy proxy, there was a chance that it would timeout when waiting for ClusterLoadAssignments. While this doesn't always immediately cause issues, consul-dataplane instances appear to consistently drop endpoints from their configurations after an xDS connection is re-established (the server dies, random disconnect, etc). This commit adds an `xds_fetch_timeout_ms` config to service registrations so that users can set the value higher for large instances that have many upstreams. The timeout can be disabled by setting a value of `0`. This configuration was introduced to reduce the risk of causing a breaking change for users if there is ever a scenario where endpoints would never be received. Rather than just always blocking indefinitely or for a significantly longer period of time, this config will affect only the service instance associated with it.
Showing
- .changelog/19871.txt 3 additions, 0 deletions.changelog/19871.txt
- agent/proxycfg/proxycfg.deepcopy.go 31 additions, 0 deletionsagent/proxycfg/proxycfg.deepcopy.go
- agent/proxycfg/snapshot.go 66 additions, 0 deletionsagent/proxycfg/snapshot.go
- agent/proxycfg/snapshot_test.go 1 addition, 0 deletionsagent/proxycfg/snapshot_test.go
- agent/proxycfg/testing_peering.go 8 additions, 6 deletionsagent/proxycfg/testing_peering.go
- agent/proxycfg/testing_terminating_gateway.go 5 additions, 5 deletionsagent/proxycfg/testing_terminating_gateway.go
- agent/proxycfg/testing_tproxy.go 4 additions, 1 deletionagent/proxycfg/testing_tproxy.go
- agent/xds/clusters.go 17 additions, 32 deletionsagent/xds/clusters.go
- agent/xds/clusters_test.go 4 additions, 2 deletionsagent/xds/clusters_test.go
- agent/xds/config/config.go 46 additions, 31 deletionsagent/xds/config/config.go
- agent/xds/config/config_test.go 61 additions, 0 deletionsagent/xds/config/config_test.go
- agent/xds/delta_envoy_extender_ce_test.go 1 addition, 1 deletionagent/xds/delta_envoy_extender_ce_test.go
- agent/xds/listeners.go 40 additions, 61 deletionsagent/xds/listeners.go
- agent/xds/listeners_apigateway.go 17 additions, 14 deletionsagent/xds/listeners_apigateway.go
- agent/xds/listeners_ingress.go 9 additions, 8 deletionsagent/xds/listeners_ingress.go
- agent/xds/listeners_test.go 1 addition, 1 deletionagent/xds/listeners_test.go
- agent/xds/resources_test.go 82 additions, 2 deletionsagent/xds/resources_test.go
- agent/xds/testdata/clusters/xds-fetch-timeout-ms-ingress-with-router.latest.golden 1477 additions, 0 deletions...rs/xds-fetch-timeout-ms-ingress-with-router.latest.golden
- agent/xds/testdata/clusters/xds-fetch-timeout-ms-mgw-peering.latest.golden 196 additions, 0 deletions...a/clusters/xds-fetch-timeout-ms-mgw-peering.latest.golden
- agent/xds/testdata/clusters/xds-fetch-timeout-ms-sidecar.latest.golden 1550 additions, 0 deletions...tdata/clusters/xds-fetch-timeout-ms-sidecar.latest.golden
Please register or sign in to comment