mirror of https://github.com/hashicorp/consul
f95ffe0355
Co-authored-by: Ashvitha Sridharan <ashvitha.sridharan@hashicorp.com> Co-authored-by: Freddy <freddygv@users.noreply.github.com> Add a new envoy flag: "envoy_hcp_metrics_bind_socket_dir", a directory where a unix socket will be created with the name `<namespace>_<proxy_id>.sock` to forward Envoy metrics. If set, this will configure: - In bootstrap configuration a local stats_sink and static cluster. These will forward metrics to a loopback listener sent over xDS. - A dynamic listener listening at the socket path that the previously defined static cluster is sending metrics to. - A dynamic cluster that will forward traffic received at this listener to the hcp-metrics-collector service. Reasons for having a static cluster pointing at a dynamic listener: - We want to secure the metrics stream using TLS, but the stats sink can only be defined in bootstrap config. With dynamic listeners/clusters we can use the proxy's leaf certificate issued by the Connect CA, which isn't available at bootstrap time. - We want to intelligently route to the HCP collector. Configuring its addreess at bootstrap time limits our flexibility routing-wise. More on this below. Reasons for defining the collector as an upstream in `proxycfg`: - The HCP collector will be deployed as a mesh service. - Certificate management is taken care of, as mentioned above. - Service discovery and routing logic is automatically taken care of, meaning that no code changes are required in the xds package. - Custom routing rules can be added for the collector using discovery chain config entries. Initially the collector is expected to be deployed to each admin partition, but in the future could be deployed centrally in the default partition. These config entries could even be managed by HCP itself. |
||
---|---|---|
.. | ||
internal/watch | ||
api_gateway.go | ||
connect_proxy.go | ||
data_sources.go | ||
data_sources_oss.go | ||
deep-copy.sh | ||
ingress_gateway.go | ||
manager.go | ||
manager_test.go | ||
mesh_gateway.go | ||
mesh_gateway_oss.go | ||
naming.go | ||
naming_oss.go | ||
naming_test.go | ||
proxycfg.deepcopy.go | ||
proxycfg.go | ||
snapshot.go | ||
snapshot_test.go | ||
state.go | ||
state_oss_test.go | ||
state_test.go | ||
terminating_gateway.go | ||
testing.go | ||
testing_api_gateway.go | ||
testing_connect_proxy.go | ||
testing_ingress_gateway.go | ||
testing_mesh_gateway.go | ||
testing_oss.go | ||
testing_peering.go | ||
testing_terminating_gateway.go | ||
testing_tproxy.go | ||
testing_upstreams.go | ||
upstreams.go |