-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path001-postgresql-cluster.yaml
69 lines (62 loc) · 1.41 KB
/
001-postgresql-cluster.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: metadatadb
namespace: archived
spec:
instances: 3
imageName: ghcr.io/cloudnative-pg/postgresql:16.3-7
minSyncReplicas: 2
maxSyncReplicas: 2
postgresql:
syncReplicaElectionConstraint:
enabled: true
nodeLabelsAntiAffinity:
- topology.kubernetes.io/node
replicationSlots:
highAvailability:
enabled: true
updateInterval: 10
primaryUpdateStrategy: unsupervised
switchoverDelay: 60
storage:
pvcTemplate:
resources:
requests:
storage: 30Gi
storageClassName: openebs-hostpath
volumeMode: Filesystem
resizeInUseVolumes: false
resources:
requests:
memory: "1Gi"
cpu: 1
limits:
memory: "1Gi"
cpu: 1
backup:
barmanObjectStore:
destinationPath: "s3://<CHANGEME: backup bucket>"
endpointURL: https://s3.example.com # (CHANGEME: s3 endpoint)
s3Credentials:
accessKeyId:
name: cnpg-backup-creds
key: ACCESS_KEY_ID
secretAccessKey:
name: cnpg-backup-creds
key: ACCESS_SECRET_KEY
retentionPolicy: "30d"
monitoring:
enablePodMonitor: true
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: metadatadb-backups
namespace: archived
spec:
schedule: "0 58 */9 * * *"
backupOwnerReference: self
cluster:
name: metadatadb