47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: postgres
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "10"
|
|
spec:
|
|
imageName: ghcr.io/cloudnative-pg/postgresql:16.2
|
|
instances: 2
|
|
primaryUpdateStrategy: unsupervised
|
|
primaryUpdateMethod: switchover
|
|
superuserSecret:
|
|
name: postgres-superuser-credentials
|
|
storage:
|
|
storageClass: hcloud-volumes
|
|
size: 10Gi
|
|
resources:
|
|
limits:
|
|
cpu: "1"
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: "1"
|
|
memory: 2Gi
|
|
# bootstrap:
|
|
# initdb:
|
|
# database: dataproxy
|
|
# owner: dataproxy
|
|
# secret:
|
|
# name: app-user-credentials
|
|
## Postgres configuration ##
|
|
# Enable 'postgres' superuser
|
|
enableSuperuserAccess: true
|
|
# Postgres instance parameters
|
|
postgresql:
|
|
parameters:
|
|
max_connections: "500"
|
|
max_slot_wal_keep_size: "1GB"
|
|
wal_keep_size: "1GB"
|
|
# High Availability configuration
|
|
minSyncReplicas: 0
|
|
maxSyncReplicas: 1
|
|
# Enable replication slots for HA in the cluster
|
|
replicationSlots:
|
|
highAvailability:
|
|
enabled: true
|
|
# monitoring:
|
|
# enablePodMonitor: true
|