initial migration
This commit is contained in:
15
infrastructure/backup/overlays/prune/kustomization.yaml
Normal file
15
infrastructure/backup/overlays/prune/kustomization.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# namespace: backup
|
||||
nameSuffix: -prune
|
||||
resources:
|
||||
- ../../base
|
||||
# - ./restic-commands.yaml
|
||||
|
||||
|
||||
# patch the cronjob args field:
|
||||
patches:
|
||||
- path: ./restic-commands.yaml
|
||||
target:
|
||||
kind: CronJob
|
24
infrastructure/backup/overlays/prune/restic-commands.yaml
Normal file
24
infrastructure/backup/overlays/prune/restic-commands.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: prune-patch
|
||||
spec:
|
||||
schedule: "0 0 1/15 * *"
|
||||
# at midnight, the first and 15. of every month
|
||||
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: restic-base-container
|
||||
args:
|
||||
# >- strips newlines
|
||||
# RESTIC_ARGS Can be for instance: --verbose --dry-run
|
||||
# RESTIC_REPOSITORY is set in the secret
|
||||
- >-
|
||||
restic forget
|
||||
-r $(RESTIC_REPOSITORY)
|
||||
--verbose=2
|
||||
--keep-daily 7 --keep-weekly 5
|
||||
--prune
|
Reference in New Issue
Block a user