2026-07-04 13:26:07 +02:00
|
|
|
|
---
|
|
|
|
|
|
# CNPG cluster for Forgejo (railiance01 production forge).
|
|
|
|
|
|
# Managed by railiance-platform (S3). Operator: cnpg-system.
|
|
|
|
|
|
#
|
|
|
|
|
|
# Apply: KUBECONFIG=~/.kube/config-hosteurope make forgejo-db-deploy
|
|
|
|
|
|
# Status: make forgejo-db-status
|
2026-09-06 00:48:25 +02:00
|
|
|
|
# Primary: Scaleway Barman + WAL. Secondary: make forgejo-backup (Nextcloud + age).
|
2026-07-04 13:26:07 +02:00
|
|
|
|
#
|
|
|
|
|
|
# Pre-condition: forgejo-db-credentials Secret in databases namespace.
|
|
|
|
|
|
# See helm/forgejo-db-secret.sops.yaml.template
|
|
|
|
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
|
|
|
|
kind: Cluster
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
name: forgejo-db
|
|
|
|
|
|
namespace: databases
|
|
|
|
|
|
labels:
|
|
|
|
|
|
app.kubernetes.io/name: forgejo-db
|
|
|
|
|
|
app.kubernetes.io/component: database
|
|
|
|
|
|
app.kubernetes.io/managed-by: manual
|
|
|
|
|
|
railiance.io/layer: s3-platform
|
|
|
|
|
|
railiance.io/consumer: forgejo
|
|
|
|
|
|
spec:
|
|
|
|
|
|
instances: 1
|
|
|
|
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:16
|
2026-07-07 18:11:26 +02:00
|
|
|
|
# Burstable QoS + headroom for pg_dump / forgejo-backup (was BestEffort → probe
|
|
|
|
|
|
# timeouts on :8000 under node CPU pressure). Sized like net-kingdom-pg on ~4Gi node.
|
|
|
|
|
|
resources:
|
|
|
|
|
|
requests:
|
|
|
|
|
|
cpu: 200m
|
|
|
|
|
|
memory: 512Mi
|
|
|
|
|
|
limits:
|
|
|
|
|
|
cpu: "1"
|
|
|
|
|
|
memory: 1Gi
|
|
|
|
|
|
# Default liveness window is 30s (3×10s); extend so backup I/O stalls do not restart the pod.
|
|
|
|
|
|
livenessProbeTimeout: 90
|
|
|
|
|
|
probes:
|
|
|
|
|
|
liveness:
|
|
|
|
|
|
timeoutSeconds: 10
|
|
|
|
|
|
periodSeconds: 15
|
|
|
|
|
|
failureThreshold: 6
|
|
|
|
|
|
readiness:
|
|
|
|
|
|
timeoutSeconds: 10
|
|
|
|
|
|
periodSeconds: 15
|
|
|
|
|
|
failureThreshold: 6
|
2026-07-04 13:26:07 +02:00
|
|
|
|
storage:
|
|
|
|
|
|
size: 10Gi
|
|
|
|
|
|
bootstrap:
|
|
|
|
|
|
initdb:
|
|
|
|
|
|
database: forgejo
|
|
|
|
|
|
owner: forgejo
|
|
|
|
|
|
secret:
|
2026-09-06 00:48:25 +02:00
|
|
|
|
name: forgejo-db-credentials
|
|
|
|
|
|
backup:
|
|
|
|
|
|
retentionPolicy: 30d
|
|
|
|
|
|
barmanObjectStore:
|
|
|
|
|
|
destinationPath: s3://railiance-platform-pg-backup/platform-pg/forgejo-db/
|
|
|
|
|
|
endpointURL: https://s3.nl-ams.scw.cloud
|
|
|
|
|
|
s3Credentials:
|
|
|
|
|
|
accessKeyId:
|
|
|
|
|
|
name: platform-pg-backup-s3
|
|
|
|
|
|
key: ACCESS_KEY_ID
|
|
|
|
|
|
secretAccessKey:
|
|
|
|
|
|
name: platform-pg-backup-s3
|
|
|
|
|
|
key: ACCESS_SECRET_KEY
|
|
|
|
|
|
wal:
|
|
|
|
|
|
compression: gzip
|
|
|
|
|
|
maxParallel: 2
|
|
|
|
|
|
data:
|
|
|
|
|
|
compression: gzip
|
|
|
|
|
|
jobs: 2
|