Files
aevolution/deploy/kubernetes/monitoring/alertmanager.yaml
T
dingoandClaude Opus 5.5 b4493b3d0f Add M8.5 observability: pinned Prometheus, tested alerts, capacity metrics
An AEvolution-only Prometheus 3.13.3 and Alertmanager 0.34.1, pinned by
digest and delivered by Argo (ADR-0072), scrape each region's operations
Service through static targets (no API access, no RBAC); the region
namespaces admit port 9100 from Prometheus only. Sixteen alert rules
cover authority, lease, commits, backlog and object capacity and are
proven by promtool injection tests in CI with tools copied from the same
pinned images. Two new gauges expose object volume free space and the
reserve. Alerts route to a null receiver until a destination is chosen;
no broker is adopted and the database outbox stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:16:36 -04:00

91 lines
2.6 KiB
YAML

# 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
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}