# ============================================================================= # Alertmanager (TASK-0135, phase-15) — Deployment + Service, ns `monitoring`. # # Config is generated into `alertmanager-config` by kustomization.yaml FROM # infrastructure/observability/alertmanager/alertmanager.yaml (single source # of truth). SMTP: alertmanager reads auth ONLY from its config file (no env # substitution) — if the relay requires credentials, add # smtp_auth_username / smtp_auth_password to the source file (or render the # ConfigMap from a SealedSecret in the pipeline); the default assumption is # an open VPC relay. Without SMTP the webhook receiver still delivers (the # dogfood path). # Image pinned: prom/alertmanager:v0.27.0. # ============================================================================= apiVersion: apps/v1 kind: Deployment metadata: name: alertmanager namespace: monitoring labels: app.kubernetes.io/name: alertmanager app.kubernetes.io/part-of: ai-software-factory spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: alertmanager strategy: type: Recreate template: metadata: labels: app.kubernetes.io/name: alertmanager spec: containers: - name: alertmanager image: prom/alertmanager:v0.27.0 imagePullPolicy: IfNotPresent args: - --config.file=/etc/alertmanager/alertmanager.yaml - --storage.path=/alertmanager ports: - containerPort: 9093 name: http volumeMounts: - name: config mountPath: /etc/alertmanager readOnly: true - name: data mountPath: /alertmanager readinessProbe: httpGet: path: /-/ready port: 9093 initialDelaySeconds: 5 periodSeconds: 10 livenessProbe: httpGet: path: /-/healthy port: 9093 initialDelaySeconds: 15 periodSeconds: 15 resources: requests: cpu: 50m memory: 64Mi limits: cpu: 200m memory: 256Mi securityContext: allowPrivilegeEscalation: false runAsNonRoot: true seccompProfile: type: RuntimeDefault volumes: - name: config configMap: name: alertmanager-config # hashed name substituted by kustomize - name: data emptyDir: {} --- apiVersion: v1 kind: Service metadata: name: alertmanager namespace: monitoring labels: app.kubernetes.io/name: alertmanager app.kubernetes.io/part-of: ai-software-factory spec: selector: app.kubernetes.io/name: alertmanager ports: - name: http port: 9093 targetPort: 9093