Skip to content
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

Update config to allow showing secret values when marshaled #4158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wallee94
Copy link
Contributor

@wallee94 wallee94 commented Dec 6, 2024

I have a deployment where a sidecar between the config-reloader and alertmanager loads and unmarshals a base configuration, extends it with more routes and receivers, and then marshals it back for the alertmanager.

image

However, the default Marshal implementations in the receivers hide all Secret and SecretURLs when marshaling the config back to a YAML. We have to duplicate all the receiver structs in our code to be able to switch them to plain strings and URLs.

I'd be helpful to be able to re-use the structs already here in the alertmanager.

This is already supported by some of the Prometheus common configs by using a global MarshalSecretValue here.

For now, I'm adding support for a MarshalSecretValue here as well. I think the Secret in this repo could also be replaced for the Secret in Prometheus common configs, but I'd like to try this first, as switching to the common Secret would be a longer PR.

@wallee94 wallee94 force-pushed the support-disable-marshal-secret-value branch from 90631e4 to 4fb452a Compare December 6, 2024 18:21
@wallee94 wallee94 force-pushed the support-disable-marshal-secret-value branch from 4fb452a to 4f10742 Compare December 6, 2024 18:22
@wallee94
Copy link
Contributor Author

wallee94 commented Dec 6, 2024

I didn't notice that this was already discussed here: #1985

I understand that the main blocker at the time was having consistency across all projects, but looks like this is something that can already be enabled in Prometheus configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant