---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgres
namespace: fediverse
annotations:
kyverno.io/ignore: "true"
spec:
instances: 3
imageName: ghcr.io/cloudnative-pg/postgresql:14.8-6
inheritedMetadata:
labels:
kube-image-keeper.enix.io/image-caching-policy: ignore
primaryUpdateStrategy: unsupervised
storage:
size: 60Gi
storageClass: ceph-block
superuserSecret:
name: cloudnative-pg-secret
bootstrap:
recovery:
source: &previousCluster postgres-v3
postgresql:
parameters:
max_connections: "600"
shared_buffers: 512MB
monitoring:
enablePodMonitor: true
backup:
retentionPolicy: 30d
barmanObjectStore:
wal:
compression: bzip2
maxParallel: 8
destinationPath: s3://valinor-cnpg/
endpointURL: https://${SECRET_CLOUDFLARE_ACCOUNT_ID}.r2.cloudflarestorage.com
serverName: valinor-postgres-v2
s3Credentials:
accessKeyId:
key: aws-access-key-id
secretAccessKey:
key: aws-secret-access-key
externalClusters:
- name: *previousCluster