2024-10-10 18:45:15 +00:00
|
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
|
|
kind: Cluster
|
|
|
|
metadata:
|
|
|
|
name: app-cluster
|
|
|
|
namespace: postgres
|
|
|
|
spec:
|
|
|
|
instances: 2
|
|
|
|
|
|
|
|
postgresql:
|
|
|
|
parameters:
|
|
|
|
max_connections: "150"
|
|
|
|
|
|
|
|
managed:
|
|
|
|
roles:
|
|
|
|
- name: ext_pgo_admin
|
|
|
|
ensure: present
|
|
|
|
login: true
|
|
|
|
superuser: true
|
|
|
|
createrole: true
|
|
|
|
createdb: true
|
|
|
|
inherit: true
|
|
|
|
connectionLimit: -1
|
|
|
|
passwordSecret:
|
|
|
|
name: ext-pgo-admin
|
|
|
|
|
|
|
|
storage:
|
|
|
|
size: 10Gi
|
|
|
|
storageClass: hcloud-volumes
|
|
|
|
|
|
|
|
bootstrap:
|
|
|
|
recovery:
|
|
|
|
source: app-cluster
|
|
|
|
|
2024-10-10 20:14:00 +00:00
|
|
|
backup:
|
|
|
|
barmanObjectStore:
|
2024-10-11 06:45:48 +00:00
|
|
|
destinationPath: "s3://1661580-backup/cnpg/gen2/"
|
2024-10-10 20:14:00 +00:00
|
|
|
endpointURL: "https://fsn1.your-objectstorage.com"
|
|
|
|
s3Credentials:
|
|
|
|
accessKeyId:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: ACCESS_KEY_ID
|
|
|
|
secretAccessKey:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: ACCESS_SECRET_KEY
|
|
|
|
region:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: AWS_REGION
|
|
|
|
wal:
|
|
|
|
compression: snappy
|
2024-10-12 21:13:02 +00:00
|
|
|
retentionPolicy: "7d"
|
2024-10-10 18:45:15 +00:00
|
|
|
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
|
|
|
memory: 600Mi
|
|
|
|
limits:
|
|
|
|
cpu: 500m
|
|
|
|
memory: 900Mi
|
|
|
|
|
|
|
|
affinity:
|
|
|
|
enablePodAntiAffinity: true
|
|
|
|
topologyKey: kubernetes.io/hostname
|
|
|
|
podAntiAffinityType: preferred
|
|
|
|
|
|
|
|
enablePDB: true
|
|
|
|
monitoring:
|
|
|
|
enablePodMonitor: true
|