feat(backups): Add recovery plan for database
This commit is contained in:
parent
a1ec506af9
commit
96f0aba576
48
manifests/database-recovery.yaml
Normal file
48
manifests/database-recovery.yaml
Normal file
@ -0,0 +1,48 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: gitea-db
|
||||
namespace: gitea
|
||||
|
||||
spec:
|
||||
instances: 2
|
||||
|
||||
storage:
|
||||
size: 1Gi
|
||||
storageClass: local-path
|
||||
|
||||
bootstrap:
|
||||
recovery:
|
||||
source: gitea-db
|
||||
|
||||
postgresql:
|
||||
pg_hba:
|
||||
- host all all all md5
|
||||
|
||||
externalClusters:
|
||||
- name: gitea-db
|
||||
barmanObjectStore:
|
||||
serverName: gitea-db
|
||||
destinationPath: "s3://halis/cloudnativepg"
|
||||
endpointURL: https://s3.halia.dev
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: s3-secret
|
||||
key: AWS_ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
name: s3-secret
|
||||
key: AWS_SECRET_ACCESS_KEY
|
||||
region:
|
||||
name: s3-secret
|
||||
key: AWS_REGION
|
||||
wal:
|
||||
compression: gzip
|
||||
maxParallel: 8
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 500Mi
|
@ -9,7 +9,7 @@ spec:
|
||||
|
||||
storage:
|
||||
size: 1Gi
|
||||
storageClass: redundant-storage-class
|
||||
storageClass: local-path
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
|
Loading…
Reference in New Issue
Block a user