Files
kube-cluster/shared-db/postgres.yaml
2026-03-31 15:30:40 +00:00

28 lines
599 B
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: shared-postgres
namespace: db
spec:
instances: 1
storage:
pvcTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storageClassName: pvc-shared-postgres
volumeMode: Filesystem
imageName: ghcr.io/cloudnative-pg/postgresql:16
bootstrap:
initdb:
database: dbtest
owner: admin
secret:
name: shared-postgres-app
postInitApplicationSQL:
- ALTER USER admin WITH SUPERUSER;
- CREATE EXTENSION vector;