grafana / mimir

Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for Prometheus.
https://grafana.com/oss/mimir/
GNU Affero General Public License v3.0
4.06k stars 516 forks source link

Environmental variables support in alertmanager configuration #5898

Open dorkamotorka opened 1 year ago

dorkamotorka commented 1 year ago

Is your feature request related to a problem? Please describe.

I would like to pass a secret to an alertmanager.fallbackConfig in the mimir-distributed helm chart. According to the Prometheus documentation, this should be possible in case I set this Feature flag. I'm aware that I'm using Mimir and not Prometheus, but seems like things like Mimir AlertManager are directly (if not actually the same) compatible with the Prometheus AlertManager.

Describe the solution you'd like

I'd like to have some way of passing secrets in the Helm - but note that this is actually a configuration file inside the Helm chart, that gets passed to the AlertManager instance and we'd need some way of env substitution there (like envsubst).

Describe alternatives you've considered

I've tried using environmental variables, but there's no such thing as envsubst to run inside the instance to replace the env variables in the YAML config

may-cDev commented 7 months ago

I tried the environment variable substitution also in multiple ways but couldn't make it work. Would also be really interested in a proper solution for substituting environment variables within the mimir alertmanager config.