# M8.5 Alertmanager (ADR-0072), pinned by digest. Every alert routes to the null # receiver until the maintainer chooses a destination (docs/BACKLOG.md); alerts are # still visible in its API and UI. Silences live in memory (emptyDir). apiVersion: apps/v1 kind: Deployment metadata: name: alertmanager labels: app.kubernetes.io/name: alertmanager spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: alertmanager template: metadata: labels: app.kubernetes.io/name: alertmanager app.kubernetes.io/part-of: aevolution spec: serviceAccountName: aevolution-alertmanager automountServiceAccountToken: false # Stateless: prefers nodes labelled for AEvolution compute (ADR-0076), and # schedules anywhere while none is labelled (the single-node plan). affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 preference: matchExpressions: - {key: aevolution.io/compute, operator: In, values: ["true"]} securityContext: runAsNonRoot: true runAsUser: 65534 runAsGroup: 65534 fsGroup: 65534 seccompProfile: {type: RuntimeDefault} containers: - name: alertmanager image: quay.io/prometheus/alertmanager:v0.34.1@sha256:e9733bafb1bdef9b00e25a21f8f99dc26a22224bf16641ad754d1649f4c3357a args: - --config.file=/etc/alertmanager/alertmanager.yml - --storage.path=/alertmanager - --web.listen-address=:9093 - --cluster.listen-address= # Single instance: no gossip port. ports: - {name: web, containerPort: 9093} readinessProbe: httpGet: {path: /-/ready, port: web} periodSeconds: 10 livenessProbe: httpGet: {path: /-/healthy, port: web} periodSeconds: 20 resources: requests: {cpu: 50m, memory: 64Mi} limits: {memory: 128Mi} securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: {drop: [ALL]} volumeMounts: - {name: config, mountPath: /etc/alertmanager, readOnly: true} - {name: data, mountPath: /alertmanager} volumes: - name: config configMap: name: alertmanager-config - name: data emptyDir: {sizeLimit: 64Mi} --- apiVersion: v1 kind: Service metadata: name: alertmanager spec: type: ClusterIP selector: app.kubernetes.io/name: alertmanager ports: - {name: web, port: 9093, targetPort: web} --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: alertmanager spec: podSelector: matchLabels: app.kubernetes.io/name: alertmanager policyTypes: [Ingress] ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: prometheus ports: - {protocol: TCP, port: 9093}