This repository has been archived on 2024-02-11. You can view files and clone it, but cannot push or open issues or pull requests.
valinor/kubernetes/apps/fediverse/mastodon/app/cnpg/cluster.yaml

60 lines
1.6 KiB
YAML

---
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:
name: cloudnative-pg-secret
key: aws-access-key-id
secretAccessKey:
name: cloudnative-pg-secret
key: aws-secret-access-key
externalClusters:
- name: *previousCluster
barmanObjectStore:
wal:
compression: bzip2
maxParallel: 8
destinationPath: s3://valinor-cnpg/
endpointURL: https://${SECRET_CLOUDFLARE_ACCOUNT_ID}.r2.cloudflarestorage.com
s3Credentials:
accessKeyId:
name: cloudnative-pg-secret
key: aws-access-key-id
secretAccessKey:
name: cloudnative-pg-secret
key: aws-secret-access-key