alertmanager/docs
Eric R. Rath efc956c7f7
SMTP config: add global and local password file fields (#3038)
* 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>
2022-09-16 14:36:57 +02:00
..
alertmanager.md Release 0.21 documentation (#2294) 2020-06-12 12:25:00 +02:00
clients.md Release 0.21 documentation (#2294) 2020-06-12 12:25:00 +02:00
configuration.md SMTP config: add global and local password file fields (#3038) 2022-09-16 14:36:57 +02:00
https.md Merge pull request #2956 from a-gavin/https_docs 2022-09-05 11:51:46 +02:00
index.md Release 0.21 documentation (#2294) 2020-06-12 12:25:00 +02:00
management_api.md /-/{healthy,ready}/ respond to HEAD (#3039) 2022-09-09 16:08:46 +02:00
notification_examples.md Updated docs. Fixed YAML newlines 2021-04-13 10:59:15 -04:00
notifications.md docs: Fix list formatting 2021-03-09 23:55:45 +01:00
overview.md Release 0.21 documentation (#2294) 2020-06-12 12:25:00 +02:00