-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostgres.yaml
74 lines (74 loc) · 1.64 KB
/
postgres.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
70
71
72
73
74
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgresql
namespace: vaultwarden
spec:
instances: 3
imageName: ghcr.io/cloudnative-pg/postgresql:16.1-12
enableSuperuserAccess: true
bootstrap:
recovery:
database: vaultwarden
owner: vaultwarden
source: postgresql
backup:
barmanObjectStore:
destinationPath: "s3://cnpg/vaultwarden-1"
endpointURL: "https://s3.mcswain.dev"
s3Credentials:
accessKeyId:
name: cnpg-minio
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: cnpg-minio
key: AWS_SECRET_ACCESS_KEY
wal:
compression: gzip
retentionPolicy: "4w"
externalClusters:
- barmanObjectStore:
destinationPath: s3://cnpg/vaultwarden
endpointURL: https://s3.mcswain.dev
s3Credentials:
accessKeyId:
key: AWS_ACCESS_KEY_ID
name: cnpg-minio
secretAccessKey:
key: AWS_SECRET_ACCESS_KEY
name: cnpg-minio
wal:
compression: gzip
name: postgresql
monitoring:
enablePodMonitor: true
storage:
size: 4Gi
resources:
requests:
memory: 80Mi
cpu: 20m
limits:
# The backup process is quite memory intensive
memory: 600Mi
smartShutdownTimeout: 30
stopDelay: 300
---
apiVersion: v1
kind: Secret
metadata:
name: cnpg-minio
annotations:
reflector.v1.k8s.emberstack.com/reflects: reflector/cnpg-minio
type: Opaque
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: backup
spec:
immediate: true
schedule: "0 0 * * * *"
backupOwnerReference: self
cluster:
name: postgresql