infra/k8s/monitoring/matrix-alertmanager-receiver.yaml
2024-11-20 06:01:51 +00:00

61 lines
1.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: matrix-alertmanager-receiver
spec:
selector:
matchLabels:
app: matrix-alertmanager-receiver
template:
metadata:
labels:
app: matrix-alertmanager-receiver
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
spec:
initContainers:
- name: secret-replacer
image: debian:stable
command:
- bash
- -c
- "sed \"s#ACCESS_TOKEN#${ACCESS_TOKEN}#\" /config/config.yaml > /tempconfig/config.yaml"
volumeMounts:
- name: tempconfig
mountPath: /tempconfig
- name: config
mountPath: /config
envFrom:
- secretRef:
name: matrix-alertmanager-receiver
containers:
- name: matrix-alertmanager-receiver
image: docker.io/metio/matrix-alertmanager-receiver:2024.11.20
args: ["--config-path", "/config/config.yaml"]
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- name: http
containerPort: 8080
volumeMounts:
- name: tempconfig
mountPath: /config
volumes:
- name: config
configMap:
name: matrix-alertmanager-receiver
- name: tempconfig
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: matrix-alertmanager-receiver
spec:
selector:
app: matrix-alertmanager-receiver
ports:
- port: 8080