feat(backups): Configure WAL and schedule backups
This commit is contained in:
parent
a54c41da9d
commit
0fc7740ac3
10
manifests/database-backup.yaml
Normal file
10
manifests/database-backup.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: ScheduledBackup
|
||||
metadata:
|
||||
name: gitea-db-backup
|
||||
namespace: gitea
|
||||
spec:
|
||||
schedule: "0 0 * * *"
|
||||
backupOwnerReference: self
|
||||
cluster:
|
||||
name: gitea-db
|
8
manifests/database-ondemande-backup.yaml
Normal file
8
manifests/database-ondemande-backup.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Backup
|
||||
metadata:
|
||||
name: gitea-db-ondemand-backup
|
||||
namespace: gitea
|
||||
spec:
|
||||
cluster:
|
||||
name: gitea-db
|
@ -22,6 +22,24 @@ spec:
|
||||
pg_hba:
|
||||
- host all all all md5
|
||||
|
||||
backup:
|
||||
barmanObjectStore:
|
||||
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
|
||||
|
@ -5,6 +5,7 @@ resources:
|
||||
- namespace.yaml
|
||||
- secrets.yaml
|
||||
- database.yaml
|
||||
- database-backup.yaml
|
||||
- service.yaml
|
||||
- servicemonitor.yaml
|
||||
- ingress.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user