apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: platform-postgres labels: app.kubernetes.io/name: platform-postgres app.kubernetes.io/component: database spec: description: Shared platform PostgreSQL instance initialized for Gitea instances: 1 imageName: ghcr.io/cloudnative-pg/postgresql:17.9-standard-trixie bootstrap: initdb: dataChecksums: true database: gitea owner: gitea secret: name: gitea-db-credentials postgresql: pg_hba: - host gitea gitea all scram-sha-256 - host all gitea all reject - host keycloak keycloak all scram-sha-256 - host all keycloak all reject - host techlog techlog all scram-sha-256 - host all techlog all reject storage: size: 20Gi managed: services: disabledDefaultServices: - ro - r affinity: enablePodAntiAffinity: false # The DB is the last thing that should go when the node runs short. # platform-critical comes from services/priority-classes. requests equal # limits so the pod is Guaranteed QoS and its oom_score_adj drops from 985 # to -997 (k3s maturity review 2026-11-11, 7.2 items 2 and 3). priorityClassName: platform-critical resources: requests: cpu: "2" memory: 4Gi limits: cpu: "2" memory: 4Gi