support loading webhook URL from a file#3223
Conversation
simonpasquier
left a comment
There was a problem hiding this comment.
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 <me@simonrozet.com>
|
@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 <me@simonrozet.com>
Signed-off-by: Simon Rozet <me@simonrozet.com>
Signed-off-by: Simon Rozet <me@simonrozet.com>
|
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 <me@simonrozet.com> * notify/webhook: add test for reading url from file Signed-off-by: Simon Rozet <me@simonrozet.com> * notify/pushover: add tests for reading secrets from files Signed-off-by: Simon Rozet <me@simonrozet.com> --------- Signed-off-by: Simon Rozet <me@simonrozet.com>
|
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 <me@simonrozet.com> * notify/webhook: add test for reading url from file Signed-off-by: Simon Rozet <me@simonrozet.com> * notify/pushover: add tests for reading secrets from files Signed-off-by: Simon Rozet <me@simonrozet.com> --------- Signed-off-by: Simon Rozet <me@simonrozet.com>
Both DeadMansSnitch and Healthchecks.io treat the URL as a secret, so I am guessing this is a common enough use case.
/cc #2498