sastra-deployment/runtime/base/postgresql.yml

87 lines
1.4 KiB
YAML

---
apiVersion: postgresql.cnpg.io/v1
kind: ClusterImageCatalog
metadata:
name: postgresql
spec:
images:
- major: 16
image: ghcr.io/cloudnative-pg/postgresql:16.0
- major: 17
image: ghcr.io/cloudnative-pg/postgresql:17.0
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: sastrafilm
spec:
instances: 2
storage:
size: 32Gi
imageCatalogRef:
apiGroup: postgresql.cnpg.io
kind: ClusterImageCatalog
name: postgresql
major: 16
bootstrap:
initdb:
database: sastrafilm
dataChecksums: true
owner: sastrafilm
secret:
name: sastrafilm-postgres
postInitApplicationSQLRefs:
secretRefs: []
---
apiVersion: postgresql.cnpg.io/v1
kind: Pooler
metadata:
name: sastrafilm-rw-pooler
spec:
cluster:
name: sastrafilm
instances: 1
type: rw
pgbouncer:
poolMode: transaction
parameters:
max_client_conn: "2048"
default_pool_size: "128"
---
apiVersion: postgresql.cnpg.io/v1
kind: Pooler
metadata:
name: sastrafilm-ro-pooler
spec:
cluster:
name: sastrafilm
instances: 1
type: ro
pgbouncer:
poolMode: transaction
parameters:
max_client_conn: "2048"
default_pool_size: "256"
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: sastrafilm
spec:
schedule: "0 2 * * *"
method: volumeSnapshot
backupOwnerReference: self
cluster:
name: sastrafilm