gcloud-lab/apps/base/customer1/siriusdevops-db/pg-cluster-siriusdevops.yaml

64 lines
1.5 KiB
YAML
Raw Normal View History

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
# NEW - Trading Dashboard role
- name: trading_dashboard
ensure: present
login: true
passwordSecret:
name: trading-dashboard-db-credentials
# Trading platform role (migrated from hermes-pgdb)
- name: trading
ensure: present
login: true
passwordSecret:
name: trading-db-credentials
# News app role (news_bot scraper + analyst + messenger)
- name: news_app
ensure: present
login: true
passwordSecret:
name: news-app-password
bootstrap:
initdb:
database: waitlist
owner: waitlist
secret:
name: waitlist-db-credentials
serviceAccountTemplate:
metadata:
name: cnpg-backup-sa
annotations:
iam.gke.io/gcp-service-account: cnpg-backup-sa@devops-lab-cluster.iam.gserviceaccount.com
backup:
barmanObjectStore:
destinationPath: "gs://customer1_db_backup/siriusdevops-backups/"
googleCredentials:
gkeEnvironment: true
wal:
compression: gzip
data:
compression: gzip
jobs: 2
retentionPolicy: "30d"
target: primary