Skip to content

Templates in use are being removed by alertmanager cleanup logic #4888

Closed
@dpericaxon

Description

@dpericaxon

Describe the bug
With the implementation of Cortex with a sidecar, templates continuously get removed every 15seconds. Through a discussion on slack, the issue is that the local storage implementation doesn't fill in the Templates slice. So the cleanup logic marks all the templates as stale.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy Helm Chart https://github.com/cortexproject/cortex-helm-chart
  2. Follow the instructions here to set up the sidecar configuration for alertmanager.
  3. Add some templates into configmaps that the sidecar is watching. It will mount those configmaps onto the filesystem and then within 15 seconds they will be deleted.

Expected behavior
The cleanup logic should not delete templates in use.

Environment:

Additional Context
Our Configuration:

alertmanager:
  external_url: /api/prom/alertmanager
  enable_api: true
  data_dir: /data/
  storage:
    type : local
    local:
      path: /data

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions