longhorn backup schedule

This commit is contained in:
azykov@mail.ru
2026-08-11 22:29:15 +03:00
parent f6077bbe44
commit ff17a67ea1
13 changed files with 128 additions and 86 deletions
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- recurringjob-backup.yaml
@@ -0,0 +1,21 @@
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: backup
namespace: longhorn-system
spec:
task: "backup"
cron: "0 3 * * *"
retain: 7
concurrency: 2
# "default" is a special group name: Longhorn auto-applies it to every
# volume that has NO recurring-job label at all - i.e. opt-out. To
# exclude a specific volume, give it any other (job-less) group label,
# e.g.:
# recurring-job-group.longhorn.io/no-backup: enabled
# (having *any* recurring-job label disqualifies it from "default" -
# there's no dedicated "disabled" flag, this placeholder-group is the
# documented workaround)
groups:
- default
labels: {}