From 677ac67e2c93b11841eab780ef2381923bc229b8 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Thu, 5 Dec 2024 22:25:45 +0100 Subject: [PATCH] feat(backup): Add scheduled backup --- manifests/grafana/database-backup.yaml | 10 ++++++++++ manifests/grafana/kustomization.yaml | 1 + 2 files changed, 11 insertions(+) create mode 100644 manifests/grafana/database-backup.yaml diff --git a/manifests/grafana/database-backup.yaml b/manifests/grafana/database-backup.yaml new file mode 100644 index 0000000..291facf --- /dev/null +++ b/manifests/grafana/database-backup.yaml @@ -0,0 +1,10 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: ScheduledBackup +metadata: + name: grafana-db-backup + namespace: monitoring +spec: + schedule: "0 0 0 * * *" + backupOwnerReference: self + cluster: + name: grafana-db diff --git a/manifests/grafana/kustomization.yaml b/manifests/grafana/kustomization.yaml index a8a1b91..08f557a 100644 --- a/manifests/grafana/kustomization.yaml +++ b/manifests/grafana/kustomization.yaml @@ -7,5 +7,6 @@ resources: - ingress.yaml - servicemonitor.yaml - database.yaml + - database-backup.yaml - datasources.yaml - deployment.yaml