mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-18 20:35:13 +00:00
efc956c7f7
* SMTP config: add global and local password file fields Add config fields (for both global email config and route-specific email config) that specify path to file containing SMTP password. We don't want the password in the config file itself, and reading the password from a k8s-secret-backed file keeps the password itself "encrypted at rest" in etcd, and cleanly separated from the rest of the AM config. I used the same approach as pull request #2534 "Add support to set the Slack URL in the file" <https://github.com/prometheus/alertmanager/pull/2534/files> in the upstream repo. Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * changed *AuthPasswordFile field types to string per review feedback Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * added error to getPassword() retval per review feedback Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * simplified conf.smtp-* files Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * update docs to reflect field type change Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * don't treat username-without-password as invalid Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * test cleanup Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * Apply suggestions from code review Co-authored-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Eric R. Rath <4080262+ericrrath@users.noreply.github.com> * Updated per review feedback Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * added sub-test per review feedback Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * added test on Email.getPassword() per feedback Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * only inherit global SMTP passwords if neither local password field is set Signed-off-by: Eric R. Rath <eric.rath@oracle.com> * removed blank line caught by gofumpt Signed-off-by: Eric R. Rath <eric.rath@oracle.com> Signed-off-by: Eric R. Rath <eric.rath@oracle.com> Signed-off-by: Eric R. Rath <4080262+ericrrath@users.noreply.github.com> Co-authored-by: Simon Pasquier <spasquie@redhat.com> |
||
---|---|---|
.. | ||
conf.empty-fields.yml | ||
conf.good.yml | ||
conf.group-by-all.yml | ||
conf.http-config.good.yml | ||
conf.nil-match_re-route.yml | ||
conf.nil-source_match_re-inhibition.yml | ||
conf.nil-target_match_re-inhibition.yml | ||
conf.opsgenie-both-file-and-apikey.yml | ||
conf.opsgenie-default-apikey-file.yml | ||
conf.opsgenie-default-apikey-old-team.yml | ||
conf.opsgenie-default-apikey.yml | ||
conf.opsgenie-no-apikey.yml | ||
conf.slack-both-file-and-url.yml | ||
conf.slack-default-api-url-file.yml | ||
conf.slack-no-api-url.yml | ||
conf.smtp-both-password-and-file.yml | ||
conf.smtp-no-username-or-password.yml | ||
conf.smtp-password-global-and-local.yml | ||
conf.sns-invalid.yml | ||
conf.sns-topic-arn.yml | ||
conf.victorops-default-apikey.yml | ||
conf.victorops-no-apikey.yml |