hashicorp / consul-k8s

First-class support for Consul Service Mesh on Kubernetes
https://www.consul.io/docs/k8s
Mozilla Public License 2.0
667 stars 318 forks source link

Update acl-init job to create token/policy for metrics scraping #1124

Open barrymars opened 2 years ago

barrymars commented 2 years ago

Community Note


Feature Description

When enabling metrics alongside ACLs, prometheus requires and auth token to scrape the consul agent metrics.

It would be nice if the consul-server-acl-init-job could automatically create the policy and token.

policy: "metrics-token" agent_prefix "" { policy = "read" }

secret: "consul-metrics-acl-token"

lkysow commented 2 years ago

Or maybe we should have a CRD for creating tokens? Might scale a bit better.

barrymars commented 2 years ago

@lkysow CRDs for creating tokens and policies would be great

We are a very GitOps driven team and the 'manual' steps required in configuring Consul are causing some friction