-
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
support loading webhook URL from a file #3223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @gotjosh are you fine with this change? It's a bit puzzling that the url
field isn't a secret type but changing it would be inconvenient for many users and the url_file
field fills a gap for some webhooks.
How bad would it be if we changed URL to Secret? I definitely think this should be a secret. |
AFAICT the only place where it's marshalled back is in the status page. So changing Side note, if it were to be changed to a secret, alertmanager/notify/webhook/webhook.go Line 106 in f59460b
|
/cc prometheus#2498 Signed-off-by: Simon Rozet <[email protected]>
@gotjosh @simonpasquier Should I make the SecretURL change here or in a separate PR? |
Can you please put together a separate PR? Thanks @sr. |
Signed-off-by: Simon Rozet <[email protected]>
Signed-off-by: Simon Rozet <[email protected]>
Signed-off-by: Simon Rozet <[email protected]>
Sweet, thanks for merging #3228. I've merged in main and added a few more tests, including a couple test cases I should have added in #3200.
|
@simonpasquier Build is now green. Good to merge? |
thanks! |
* support loading webhook URL from a file /cc prometheus#2498 Signed-off-by: Simon Rozet <[email protected]> * notify/webhook: add test for reading url from file Signed-off-by: Simon Rozet <[email protected]> * notify/pushover: add tests for reading secrets from files Signed-off-by: Simon Rozet <[email protected]> --------- Signed-off-by: Simon Rozet <[email protected]>
Is it possible to have one secrets file with multiple |
* support loading webhook URL from a file /cc prometheus#2498 Signed-off-by: Simon Rozet <[email protected]> * notify/webhook: add test for reading url from file Signed-off-by: Simon Rozet <[email protected]> * notify/pushover: add tests for reading secrets from files Signed-off-by: Simon Rozet <[email protected]> --------- Signed-off-by: Simon Rozet <[email protected]>
Both DeadMansSnitch and Healthchecks.io treat the URL as a secret, so I am guessing this is a common enough use case.
/cc #2498