mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 20:23:39 +09:00
The email receiver added in #3800 sends the default Alertmanager subject and HTML body, a subject that strings together every common label of the group and a table of labels and annotations. Subject and body templates were left out of the values on purpose, because Alertmanager parses inline templates only when it sends, so a broken one drops mail with nothing but a log line to show for it. alerta.alerts.email.template takes the text of a template file instead. The chart stores it in the alertmanager-email-template ConfigMap and lists it in VMAlertmanager spec.templates. The operator mounts it, adds it to the configuration templates and has the config reloader watch the mounted directory, so Alertmanager parses the file while loading its configuration. Defining email.default.subject and email.default.html in it replaces the subject and the body of every email. The text has to contain a define action, a value that is not text fails the render, and template counts as a set field for the check that rejects a partial email configuration. Assisted-by: LLM Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>