monitoring: enable discord notifications

This commit is contained in:
2025-12-01 20:10:03 -05:00
parent ae8f0e560a
commit e7fb07343c
3 changed files with 91 additions and 1 deletions

View File

@@ -0,0 +1,66 @@
{{- if .Values.discord.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: alertmanager-discord
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: alertmanager-discord
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
selector:
matchLabels:
app: alertmanager-discord
template:
metadata:
labels:
app: alertmanager-discord
spec:
containers:
- name: alertmanager-discord
image: {{ .Values.discord.image | default "ghcr.io/rogerrum/alertmanager-discord:1.0.7" }}
ports:
- containerPort: 9094
env:
- name: LISTEN_ADDRESS
value: "0.0.0.0:9094"
- name: DISCORD_WEBHOOK
valueFrom:
secretKeyRef:
name: {{ .Values.discord.secret.name | quote }}
key: {{ .Values.discord.secret.key | quote }}
{{- if .Values.discord.username }}
- name: DISCORD_USERNAME
value: {{ .Values.discord.username | quote }}
{{- end }}
{{- if .Values.discord.avatar_url }}
- name: DISCORD_AVATAR_URL
value: {{ .Values.discord.avatar_url | quote }}
{{- end }}
{{- if .Values.discord.verbose }}
- name: VERBOSE
value: "ON"
{{- end }}
resources:
requests:
memory: "128Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "1"
---
apiVersion: v1
kind: Service
metadata:
name: alertmanager-discord
namespace: {{ .Release.Namespace }}
spec:
type: ClusterIP
selector:
app: alertmanager-discord
ports:
- port: 9094
targetPort: 9094
protocol: TCP
{{- end }}