Notify when an alert fires or is resolved

Notify logic:

  • should notify once when an alert starts firing
  • should renotify once a day while it keeps firing
  • should notify when an alert is resolved
  • should not notify that an alert is resolved while a prometheus host
    does not answer

The repeat_interval (24h) is configurable, so that re-notifications can
be tested in lima-kilo/toolsbeta without waiting 24h.

Deploy the poller with the Recreate strategy. With a single replica,
the default RollingUpdate starts the new pod before it stops the old
one, and two pollers would notify at the same time.

Things that are missing and will be implemented in follow-up commits:

  • The ledger that remembers what was already notified is kept in memory,
    so a restart of the poller will trigger new notifications. This is
    addressed in the next commit.

  • The notifications are only logged for now, sending the emails will be
    implemented in a separate commit.

  • The set of tools that opted in is hardcoded, in the future it will be
    fetched from components-api, but we have to wait until we are ready to
    expose this functionality to users.

Assisted-by: Claude Opus 5
Assisted-by: Claude Opus 5.5
Bug: T432865


Related MRs:

Edited by FNegri

Merge request reports

Loading