open-consul/command
Ashvitha f514182f3e
Allow HCP metrics collection for Envoy proxies
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.
2023-03-10 13:52:54 -07:00
..
acl Fix flakey tests related to ACL token updates (#16545) 2023-03-06 23:14:06 +00:00
agent troubleshoot: make output have tables and colors (#16235) 2023-02-10 11:12:13 -08:00
catalog re-run gofmt on 1.17 (#11579) 2021-11-16 12:04:01 -06:00
cli troubleshoot: make output have tables and colors (#16235) 2023-02-10 11:12:13 -08:00
config config entry: hardcode proxy-defaults name as global (#14833) 2022-10-25 10:55:15 -07:00
connect Allow HCP metrics collection for Envoy proxies 2023-03-10 13:52:54 -07:00
debug Fix various flaky tests (#16396) 2023-02-23 14:52:18 -05:00
event testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
exec Replace use of 'sane' where appropriate 2021-07-02 12:18:46 -04:00
flags removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
forceleave agent: add variation of force-leave that exclusively works on the WAN (#11722) 2021-12-02 17:15:10 -06:00
helpers Native API Gateway Config Entries (#15897) 2023-01-18 22:14:34 +00:00
info testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
intention bulk rewrite using this script 2022-01-20 10:46:23 -06:00
join partitions: various refactors to support partitioning the serf LAN pool (#11568) 2021-11-15 09:51:14 -06:00
keygen
keyring Fixup acl.EnterpriseMeta 2022-04-05 15:11:49 -07:00
kv removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
leave testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
lock removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
login removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
logout ACL error improvements: incomplete bootstrapping and non-existent token (#16105) 2023-02-08 23:49:44 +00:00
maint Fix maint test 2021-07-30 12:58:46 -04:00
members [OSS] security: update go to 1.20.1 (#16263) 2023-02-17 15:04:12 -05:00
monitor fix monitor to only start the monitor in json format when requested (#10358) 2021-06-07 12:08:48 -04:00
operator Fix a couple inconsistencies in `operator usage instances` command (#16260) 2023-02-24 17:51:09 +00:00
peering Bring back parameter ServerExternalAddresses in GenerateToken endpoint (#15267) 2022-11-08 14:55:18 -06:00
reload testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
rtt Pass remote addr of incoming HTTP requests through to RPC(..) calls (#15700) 2022-12-14 09:24:22 -06:00
services [OSS] feat: access logs for listeners and listener filters (#15864) 2022-12-22 15:18:15 -05:00
snapshot removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
tls Update docs for tls commands (#16077) 2023-01-30 17:26:56 +00:00
troubleshoot troubleshoot: fixes and updated messages (#16294) 2023-02-17 07:43:05 -08:00
validate removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
version removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
watch removes ioutil usage everywhere which was deprecated in go1.16 (#15297) 2022-11-10 10:26:01 -06:00
registry.go Add the `operator usage instances` command and api endpoint (#16205) 2023-02-08 12:07:21 -08:00
registry_oss.go Add build tag for oss (#13279) 2022-05-27 11:39:58 -04:00