Description
What did you do?
I am looking for a way to programmatically generate Alertmanager configurations. I imported github.com/prometheus/alertmanager/config
into my project and used it to generate an Alertmanager config, which I then marshaled into a YAML string and wrote out to a Kubernetes ConfigMap.
What did you expect to see? What did you see instead?
I expected a working Alertmanager config, but all the API keys for my receivers had been marshaled into the string "<secret>
". It would be great if there was a way to override this custom marshaling and get a working Alertmanager config with API keys and other secrets uncensored. They would still need to be censored by default, for places like the Alertmanager UI.
Other approaches
If secrets could be passed into the Alertmanager config using file locations, rather than directly as strings, then there would be no need to override the secret marhsaling behaviour. e.g.
slack_configs:
- api_url: /path/to/api_url