Files
HetznerTerra/infrastructure/addons/cnpg/postgres-cluster.yaml
MichaelFisher1997 5fa2b411ee
Some checks failed
Deploy Cluster / Terraform (push) Successful in 35s
Deploy Cluster / Ansible (push) Has been cancelled
fix: Fix Cluster CR schema - use barmanObjectStore instead of b2
2026-03-26 00:33:04 +00:00

82 lines
1.8 KiB
YAML

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: rancher-db
namespace: cnpg-cluster
spec:
description: "Rancher external database cluster"
imageName: ghcr.io/cloudnative-pg/postgresql:17.4
imagePullPolicy: IfNotPresent
instances: 1
primaryUpdateStrategy: unsupervised
storage:
storageClass: local-path
size: 50Gi
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 2Gi
bootstrap:
recovery:
source: b2-backup
externalClusters:
- name: b2-backup
barmanObjectStore:
bucketName: HetznerTerra
region: us-east-005
endpoint: https://s3.us-east-005.backblazeb2.com
s3Compatible:
enabled: true
credentials:
accessKeyIdSecret:
name: b2-credentials
key: B2_ACCOUNT_ID
secretAccessKeySecret:
name: b2-credentials
key: B2_APPLICATION_KEY
backupPath: rancher-backups/
backup:
barmanObjectStore:
bucketName: HetznerTerra
region: us-east-005
endpoint: https://s3.us-east-005.backblazeb2.com
s3Compatible:
enabled: true
credentials:
accessKeyIdSecret:
name: b2-credentials
key: B2_ACCOUNT_ID
secretAccessKeySecret:
name: b2-credentials
key: B2_APPLICATION_KEY
backupPath: rancher-backups/
walPath: rancher-backups/wals
retentionPolicy: keep14
serviceAccountTemplate:
metadata:
labels:
app.kubernetes.io/name: rancher-db
superuserSecret:
name: rancher-db-password
monitoring:
enablePodMonitor: true
affinity:
nodeSelector:
kubernetes.io/hostname: k8s-cluster-cp-1
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule