Move Alertmanager config back into helm #14

Merged
aaron merged 4 commits from alertmanager-0-26-0 into main 2023-09-15 01:02:32 +02:00
2 changed files with 20 additions and 12 deletions
Showing only changes of commit 778306127f - Show all commits

15
prometheus/templates.yaml Normal file
View file

@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: templates
namespace: prometheus
data:
telegram.tmpl: |-
{{ define "telegram.aaron" }}
{{ range .Alerts }}
{{ if eq .Status "firing"}}🔥 <b>{{ .Labels.alertname }}</b> 🔥{{ else }}✅ <b>{{ .Labels.alertname }}</b> ✅{{ end }}
<b> {{ .Annotations.summary }} </b>
{{ .Annotations.description }}
{{ end }}
{{ end }}

View file

@ -2,12 +2,14 @@ alertmanager:
alertmanagerSpec:
replicas: 2
secrets:
- telegram-api
- "telegram-api"
configMaps:
- "templates"
config:
global:
resolve_timeout: 5m
templates:
- '/etc/alertmanager/config/*.tmpl'
- '/etc/alertmanager/configmaps/*.tmpl'
route:
group_by: ['alertname']
group_wait: 30s
@ -36,16 +38,6 @@ alertmanager:
target_matchers:
- severity = warning
equal: ['alertname', 'server', 'instance']
templateFiles:
telegram.tmpl: |-
{{ define "telegram.aaron" }}
{{ range .Alerts }}
{{ if eq .Status "firing"}}🔥 <b>{{ .Labels.alertname }}</b> 🔥{{ else }}✅ <b>{{ .Labels.alertname }}</b> ✅{{ end }}
<b> {{ .Annotations.summary }} </b>
{{ .Annotations.description }}
{{ end }}
{{ end }}
storage:
volumeClaimTemplate:
spec:
@ -53,6 +45,7 @@ alertmanager:
resources:
requests:
storage: 5Gi
useExistingSecret: false
ingress:
paths:
- /