A 3-replica PostgreSQL-style StatefulSet with stable storage and stable network identity. The headless Service exposes each pod under a predictable DNS name (<release>-db-0.<release>-db.<ns>.svc).
StatefulSet, not Deployment — needed for stable storage + stable DNS.
volumeClaimTemplates
Per-pod PVC; volumes (the per-pod ephemeral kind) wouldn’t survive pod replacement.
service.clusterIP: None
Headless Service so each pod gets <pod>.<service>.<ns>.svc DNS.
service.ports.postgres
Single non-http port — port ordering rule still puts it first since “http” is absent (alphabetical fallback).
No Ingress, no HPA
Stateful workloads aren’t horizontally autoscaled in this template (use a connection pooler or read-replicas pattern instead).
Pre-existing Secret
db-credentials Secret must exist in the namespace before install (or come from a different release). For an ESO-managed flow, see ../07-external-secrets/.