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 memory: 100Mi
limits: limits:
memory: 512Mi memory: 512Mi
backup: plugins:
retentionPolicy: "30d" - name: barman-cloud.cloudnative-pg.io
barmanObjectStore: isWALArchiver: true
destinationPath: s3://postgresql-backups/grafana parameters:
endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80 barmanObjectName: grafana-backup-store
s3Credentials: - apiVersion: barmancloud.cnpg.io/v1
accessKeyId: kind: ObjectStore
name: grafana-pg-backup-creds metadata:
key: AWS_ACCESS_KEY_ID name: grafana-backup-store
secretAccessKey: namespace: monitoring
name: grafana-pg-backup-creds spec:
key: AWS_SECRET_ACCESS_KEY retentionPolicy: "30d"
wal: configuration:
compression: bzip2 destinationPath: s3://postgresql-backups/grafana
data: endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80
compression: bzip2 s3Credentials:
scheduledBackups: accessKeyId:
- name: daily-backup name: grafana-pg-backup-creds
schedule: "0 2 * * *" # 2 AM daily key: AWS_ACCESS_KEY_ID
backupOwnerReference: self 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 - apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim kind: ObjectBucketClaim
metadata: metadata: