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,9 +179,19 @@ grafana:
memory: 100Mi memory: 100Mi
limits: limits:
memory: 512Mi memory: 512Mi
backup: 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" retentionPolicy: "30d"
barmanObjectStore: configuration:
destinationPath: s3://postgresql-backups/grafana destinationPath: s3://postgresql-backups/grafana
endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80 endpointURL: http://rook-ceph-rgw-ceph-objectstore.rook-ceph.svc:80
s3Credentials: s3Credentials:
@ -195,10 +205,21 @@ grafana:
compression: bzip2 compression: bzip2
data: data:
compression: bzip2 compression: bzip2
scheduledBackups: immediateCheckpoint: true
- name: daily-backup - apiVersion: postgresql.cnpg.io/v1
schedule: "0 2 * * *" # 2 AM daily kind: ScheduledBackup
metadata:
name: grafana-pg-backup
namespace: monitoring
spec:
method: plugin
immediate: true
schedule: "0 30 2 * * *" # 2:30 AM daily
backupOwnerReference: self 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: