cortexproject / cortex

A horizontally scalable, highly available, multi-tenant, long term Prometheus.
https://cortexmetrics.io/
Apache License 2.0
5.45k stars 793 forks source link

AlertManager loda templates from sidecar #5677

Open buker opened 10 months ago

buker commented 10 months ago

Describe the bug I can't load templates to alertmanager using sidecar build in helm deployment. When alert is used i get error that can't find template.

To Reproduce Steps to reproduce the behavior:

  1. Create config map with templates kind: ConfigMap metadata: name: cortex-alertmanager-templates namespace: {{ .Release.Namespace }} annotations: k8s-sidecar-target-directory: /data/fake/templates/ labels: cortex_alertmanager: "1" apiVersion: v1 data: {{- range $key, $val := .Values.alertmanagerConfig.templateFiles }} {{ $key }}: {{ $val | quote }} {{- end }}
  2. Deploy config map to cluster

File from config map is showing up in pointed directory.

Expected behavior Templates are available for alertmanager.

Environment:

Additional Context Chart version: 1.7.0 I am not using multitenant/auth configuration

yeya24 commented 10 months ago

It is a setup issue from your deployment/configuration. I don't know how much we could help with it

buker commented 10 months ago

Could you share how properly add templates via sidecart? It will help a lot

yeya24 commented 6 months ago

Is this something you can help with? @qinxx108 @emanlodovice