apps
infrastructure
argocd
authelia
backup
cronjobs-base
cronjobs-overlays
backup
prune
kustomization.yaml
restic-commands.yaml
README.md
backblaze-credentials.sealedsecret.yaml
kustomization.yaml
namespace.yaml
pvc.yaml
restic-password.sealedsecret.yaml
external
external-dns
gitea
metallb-system
nfs-provisioner
pg-ha
prometheus
renovate
sealedsecrets
traefik-system
kluster-deployments
.gitignore
README.md
renovate.json
31 lines
863 B
YAML
31 lines
863 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: restic-backblaze-prune
|
|
spec:
|
|
schedule: "0 0 1/15 * *"
|
|
# at midnight, the first and 15. of every month
|
|
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
initContainers:
|
|
- name: restic-base-container
|
|
args:
|
|
# >- strips newlines
|
|
# RESTIC_ARGS Can be for instance: --verbose --dry-run
|
|
# RESTIC_REPOSITORY is set in the secret
|
|
- >-
|
|
restic unlock
|
|
&&
|
|
restic forget
|
|
-r $(RESTIC_REPOSITORY)
|
|
--verbose=2
|
|
--keep-daily 7 --keep-weekly 10
|
|
--prune
|
|
containers:
|
|
- name: ntfy-command-send
|
|
env:
|
|
- name: OPERATION
|
|
value: "Restic prune on backblaze" |