diff --git a/prometheus/templates.yaml b/prometheus/templates.yaml
new file mode 100644
index 0000000..6c8c408
--- /dev/null
+++ b/prometheus/templates.yaml
@@ -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"}}🔥 {{ .Labels.alertname }} 🔥{{ else }}✅ {{ .Labels.alertname }} ✅{{ end }}
+ {{ .Annotations.summary }}
+
+ {{ .Annotations.description }}
+ {{ end }}
+ {{ end }}
\ No newline at end of file
diff --git a/prometheus/values.yaml b/prometheus/values.yaml
index 6cf2e01..9c5a5da 100644
--- a/prometheus/values.yaml
+++ b/prometheus/values.yaml
@@ -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"}}🔥 {{ .Labels.alertname }} 🔥{{ else }}✅ {{ .Labels.alertname }} ✅{{ end }}
- {{ .Annotations.summary }}
-
- {{ .Annotations.description }}
- {{ end }}
- {{ end }}
storage:
volumeClaimTemplate:
spec:
@@ -53,6 +45,7 @@ alertmanager:
resources:
requests:
storage: 5Gi
+ useExistingSecret: false
ingress:
paths:
- /