homek8s/apps/base/sirius-growth/scheduled-backup.yaml

24 lines
1,009 B
YAML
Raw Permalink Normal View History

apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: portal-daily
namespace: sirius-growth
spec:
# Six-field cron (seconds first — CNPG, not standard cron). 03:20 UTC, clear
# of the 02:37 forgejo/cluster-backup CronJob so the two do not fight for the
# primary's I/O on a laptop disk.
schedule: "0 20 3 * * *"
cluster:
name: portal
# `self`: the Backup objects are owned by this ScheduledBackup, so deleting the
# schedule (or the namespace) does not leave orphaned Backups pointing at the
# cluster. Retention/cleanup of the archive itself is the ObjectStore's
# spec.retentionPolicy (14d), enforced by the plugin's sidecar.
backupOwnerReference: self
# Plugin method, not `barmanObjectStore`: the in-tree method is removed in
# CNPG 1.31. `pluginConfiguration` names the CNPG-I plugin, whose
# ObjectStore is referenced by the Cluster's spec.plugins.
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
immediate: false