diff --git a/alertmanager-matrix/Chart.yaml b/alertmanager-matrix/Chart.yaml index e0de9a4..83b2355 100644 --- a/alertmanager-matrix/Chart.yaml +++ b/alertmanager-matrix/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: alertmanager-matrix description: Service for managing and receiving Alertmanager alerts on Matrix type: application -version: 0.1.0 +version: 0.1.1 appVersion: "latest" keywords: - matrix diff --git a/alertmanager-matrix/templates/configmap.yaml b/alertmanager-matrix/templates/configmap.yaml index 63ce73d..0988db5 100644 --- a/alertmanager-matrix/templates/configmap.yaml +++ b/alertmanager-matrix/templates/configmap.yaml @@ -3,12 +3,16 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "alertmanager-matrix.fullname" . }} + annotations: + config-icons: {{ toYaml .Values.bot.icons | sha256sum | trunc 32}} + config-colors: {{ toYaml .Values.bot.colors | sha256sum | trunc 32}} + config-templates: {{ toYaml .Values.bot.templates | sha256sum | trunc 32}} data: - icon.yaml: > + icon.yaml: | {{- toYaml .Values.bot.icons | nindent 4 }} - color.yaml: > + color.yaml: | {{- toYaml .Values.bot.colors | nindent 4 }} - text.tpl: > + text.tpl: | {{- .Values.bot.template.text | nindent 4 }} - html.tpl: > + html.tpl: | {{- .Values.bot.template.html | nindent 4 }} diff --git a/alertmanager-matrix/templates/deployment.yaml b/alertmanager-matrix/templates/deployment.yaml index dec6ae7..6b75ac1 100644 --- a/alertmanager-matrix/templates/deployment.yaml +++ b/alertmanager-matrix/templates/deployment.yaml @@ -13,10 +13,13 @@ spec: {{- include "alertmanager-matrix.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} annotations: + config-icons: {{ toYaml .Values.bot.icons | sha256sum | trunc 32}} + config-colors: {{ toYaml .Values.bot.colors | sha256sum | trunc 32}} + config-templates: {{ toYaml .Values.bot.templates | sha256sum | trunc 32}} + {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} labels: {{- include "alertmanager-matrix.selectorLabels" . | nindent 8 }} spec: diff --git a/alertmanager-matrix/values.yaml b/alertmanager-matrix/values.yaml index 62f3194..186d3af 100644 --- a/alertmanager-matrix/values.yaml +++ b/alertmanager-matrix/values.yaml @@ -30,6 +30,7 @@ bot: token: "SECRET_TOKEN" rooms: - "!not_existing:matrix.org" + - "!also_not_existing:matrix.org" alertmanager: "http://localhost:9093" showLabels: false messageType: "m.notice" @@ -59,7 +60,7 @@ bot: {{.StatusString|upper}} {{.AlertName}}: {{.Summary}} - {{if ne .Fingerprint \"\"}} + {{if ne .Fingerprint ""}} ({{.Fingerprint}}) {{end}} {{if $.ShowLabels}}