2024-07-02 20:04:09 +00:00
|
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
|
|
kind: Cluster
|
|
|
|
metadata:
|
|
|
|
name: app-cluster
|
|
|
|
namespace: postgres
|
|
|
|
spec:
|
|
|
|
instances: 2
|
|
|
|
|
2024-08-22 17:26:09 +00:00
|
|
|
postgresql:
|
|
|
|
parameters:
|
|
|
|
max_connections: "150"
|
|
|
|
|
2024-07-02 20:04:09 +00:00
|
|
|
managed:
|
|
|
|
roles:
|
|
|
|
- name: ext_pgo_admin
|
|
|
|
ensure: present
|
2024-08-14 18:41:33 +00:00
|
|
|
login: true
|
2024-07-02 20:04:09 +00:00
|
|
|
superuser: true
|
|
|
|
createrole: true
|
|
|
|
createdb: true
|
2024-08-14 18:08:25 +00:00
|
|
|
inherit: true
|
|
|
|
connectionLimit: -1
|
2024-08-14 18:35:02 +00:00
|
|
|
passwordSecret:
|
|
|
|
name: ext-pgo-admin
|
2024-07-02 20:04:09 +00:00
|
|
|
|
|
|
|
storage:
|
|
|
|
size: 10Gi
|
|
|
|
storageClass: hcloud-volumes
|
|
|
|
|
|
|
|
backup:
|
|
|
|
barmanObjectStore:
|
2024-08-14 19:21:02 +00:00
|
|
|
destinationPath: "s3://cnpg/app-cluster/"
|
|
|
|
endpointURL: "http://garage.garage.svc:3900"
|
2024-07-02 20:04:09 +00:00
|
|
|
s3Credentials:
|
|
|
|
accessKeyId:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: ACCESS_KEY_ID
|
|
|
|
secretAccessKey:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: ACCESS_SECRET_KEY
|
2024-08-14 19:21:02 +00:00
|
|
|
region:
|
|
|
|
name: cnpg-backup-creds
|
|
|
|
key: AWS_REGION
|
2024-08-14 18:18:29 +00:00
|
|
|
wal:
|
|
|
|
compression: snappy
|
2024-07-02 20:04:09 +00:00
|
|
|
retentionPolicy: "30d"
|
|
|
|
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
2024-08-15 13:56:07 +00:00
|
|
|
memory: 600Mi
|
2024-07-02 20:04:09 +00:00
|
|
|
limits:
|
|
|
|
cpu: 500m
|
2024-08-15 13:56:07 +00:00
|
|
|
memory: 900Mi
|
2024-07-02 20:04:09 +00:00
|
|
|
|
|
|
|
affinity:
|
|
|
|
enablePodAntiAffinity: true
|
|
|
|
topologyKey: kubernetes.io/hostname
|
|
|
|
podAntiAffinityType: preferred
|
|
|
|
|
|
|
|
enablePDB: true
|
|
|
|
monitoring:
|
|
|
|
enablePodMonitor: true
|