infra/k8s/monitoring/matrix-alertmanager-receiver.yaml

62 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-09-02 01:07:04 +00:00
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.10.16
2024-09-02 01:07:04 +00:00
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