Merge pull request #1 from sirius0xdev/feat/openclaw-pgdb

feat: add persistent database for SiriusClaw memory
This commit is contained in:
sirius0xdev 2026-04-18 10:21:11 -04:00 committed by GitHub
commit dacdc2feb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 51 additions and 0 deletions

View file

@ -6,3 +6,4 @@ resources:
- deployment.yaml
- service.yaml
- openclaw-secrets.yaml
- pg-cluster-openclaw.yaml

View file

@ -0,0 +1,50 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: openclaw-pgdb
namespace: customer1
spec:
instances: 3
imageName: ghcr.io/cloudnative-pg/postgresql:15.2
storage:
size: 20Gi
managed:
roles:
- name: siriusclaw
ensure: present
login: true
passwordSecret:
name: openclaw-db-credentials
bootstrap:
initdb:
database: openclaw_memory
owner: siriusclaw
secret:
name: openclaw-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/openclaw-backups/"
googleCredentials:
gkeEnvironment: true
wal:
compression: gzip
data:
compression: gzip
jobs: 2
retentionPolicy: "30d"
target: primary
---
apiVersion: v1
kind: Secret
metadata:
name: openclaw-db-credentials
namespace: customer1
type: Opaque
stringData:
username: siriusclaw
password: "GenerateSecurePasswordHere123!" # In production, SOPS will encrypt this