-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: override secret censoring during marshaling to YAML #1985
Comments
It's not the first time this request is made but until now, the maintainers are reluctant to expose those types externally. See #1804 (comment) for the arguments. |
@simonpasquier would a package-level flag work? I can send a PR to enable something like: config.MarshalSecrets = true
yaml.Marshal(c) // stuff gets outputted with secret |
The usecase is really not clear here. |
@roidelapluie for my specific case, we're trying to update Alertmanager configuration programatically (rather than by hand). The |
To repeat what Stuart said in an earlier discussion:
This is the most important point: we want consistency across all projects under the Prometheus organization and Alertmanager alone can't go a different path. |
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
It's not possible to use the upstream type from the Alertmanager project completely, as it will obfuscate any secrets in the yaml that it creates, which we don't want. See the following issue for more info: prometheus/alertmanager#1985
After reconsidering, it seems that it may be reasonable for libraries to choose to participate in this, particularly as webhook URLs are being treated as secrets in next releases. |
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.
The text was updated successfully, but these errors were encountered: