Refactor backup configuration in Grafana values.yaml to use barman-cloud plugin and update scheduled backup settings

This commit is contained in:
Marco van Zijl 2025-11-09 20:16:47 +01:00
parent c4e6fe3e84
commit 0fba92f6cc

View File

@ -179,26 +179,47 @@ grafana:
memory: 100Mi
limits:
memory: 512Mi
backup:
retentionPolicy: "30d"
barmanObjectStore:
destinationPath: s3://postgresql-backups/grafana
endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80
s3Credentials:
accessKeyId:
name: grafana-pg-backup-creds
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: grafana-pg-backup-creds
key: AWS_SECRET_ACCESS_KEY
wal:
compression: bzip2
data:
compression: bzip2
scheduledBackups:
- name: daily-backup
schedule: "0 2 * * *" # 2 AM daily
backupOwnerReference: self
plugins:
- name: barman-cloud.cloudnative-pg.io
isWALArchiver: true
parameters:
barmanObjectName: grafana-backup-store
- apiVersion: barmancloud.cnpg.io/v1
kind: ObjectStore
metadata:
name: grafana-backup-store
namespace: monitoring
spec:
retentionPolicy: "30d"
configuration:
destinationPath: s3://postgresql-backups/grafana
endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80
s3Credentials:
accessKeyId:
name: grafana-pg-backup-creds
key: AWS_ACCESS_KEY_ID
secretAccessKey:
name: grafana-pg-backup-creds
key: AWS_SECRET_ACCESS_KEY
wal:
compression: bzip2
data:
compression: bzip2
immediateCheckpoint: true
- apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: grafana-pg-backup
namespace: monitoring
spec:
method: plugin
immediate: true
schedule: "0 30 2 * * *" # 2:30 AM daily
backupOwnerReference: self
cluster:
name: grafana-pg-cluster
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
- apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata: