add backups

This commit is contained in:
Lee 2024-09-23 03:17:20 +01:00
parent 0dc125a84e
commit cd076bd222
6 changed files with 1043 additions and 979 deletions

@ -0,0 +1,27 @@
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: kubernetes-backups
namespace: backups
spec:
# The PVC to be backed up
sourcePVC: set me
trigger:
# Take a backup every hour
schedule: "* * * * *"
restic:
# Prune the repository (repack to free space) every 2 weeks
pruneIntervalDays: 14
# Name of the Secret with the connection information
repository: restic-config
# Retention policy for backups
retain:
hourly: 6
daily: 5
weekly: 4
monthly: 2
yearly: 1
# Clone the source volume prior to taking a backup to ensure a
# point-in-time image.
copyMethod: Clone

@ -0,0 +1,7 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: backups
resources:
- namespace.yaml
- volsync.yaml

@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: backups

@ -0,0 +1,26 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: volsync-repository
namespace: backups
spec:
interval: 12h
url: https://backube.github.io/helm-charts/
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: volsync
namespace: backups
spec:
interval: 30m
chart:
spec:
chart: volsync
version: "0.10.0"
sourceRef:
kind: HelmRepository
name: volsync
namespace: backups
interval: 12h

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff