#@ load("@ytt:data", "data")

#@ ns = data.values.application.namespace

#@ if data.values.backups.enabled:
---
apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
  name: forgejo-daily-backup
  namespace: #@ ns
spec:
  cluster:
    name: forgejo-cnpg
  schedule: "0 0 2 * * *"
  method: barmanObjectStore
  backupOwnerReference: cluster
  target: prefer-standby
#@ end
