66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
{{- 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 }} |