feat: add siriusdevops CNPG cluster + waitlist API K8s manifests (#112)

- New CNPG PostgreSQL cluster (siriusdevops-pgdb) in customer1 namespace
- Single-instance, 20Gi storage, GCS backups to siriusdevops-backups/
- Waitlist database definition (waitlist-db.yaml)
- Scheduled backup manifest
- Waitlist API deployment, service, HTTPRoute, and Telegram secret placeholder
- Kustomization wiring for both siriusdevops-db and waitlist-api
This commit is contained in:
sirius0xdev 2026-05-14 19:24:33 -04:00 • committed by GitHub
commit 36b1d637f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 232 additions and 0 deletions

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pg-cluster-siriusdevops.yaml
- waitlist-db-credentials.yaml
- waitlist-db.yaml
- siriusdevops-scheduled-backup.yaml

View file

@ -0,0 +1,45 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: siriusdevops-pgdb
namespace: customer1
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:15.2
storage:
size: 20Gi
managed:
roles:
- name: waitlist
ensure: present
login: true
passwordSecret:
name: waitlist-db-credentials
bootstrap:
initdb:
database: waitlist
owner: waitlist
secret:
name: waitlist-db-credentials
serviceAccountTemplate:
metadata:
name: cnpg-backup-sa
annotations:
iam.gke.io/gcp-service-account: [email protected]
backup:
barmanObjectStore:
destinationPath: "gs://customer1_db_backup/siriusdevops-backups/"
googleCredentials:
gkeEnvironment: true
wal:
compression: gzip
data:
compression: gzip
jobs: 2
retentionPolicy: "30d"
target: primary

View file

@ -0,0 +1,12 @@
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: siriusdevops-daily-backup
namespace: customer1
spec:
schedule: "0 4 * * *" # Daily at 04:00 UTC
suspend: false
immediate: false
backupOwnerReference: self
cluster:
name: siriusdevops-pgdb

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: waitlist-db-credentials
namespace: customer1
type: Opaque
stringData:
username: waitlist
password: CHANGEME
sops:
age:
- recipient: age1uuxf066xuuqgvjppxfcmqkwfcufnwp3wcwnl9h20g9k4l8nkw9jsaungf7
encrypted_regex: ^(data|stringData)$

View file

@ -0,0 +1,10 @@
apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: waitlist-db
namespace: customer1
spec:
cluster:
name: siriusdevops-pgdb
name: waitlist
owner: waitlist