This CronJob schedules a periodic run of `restic forget`, which deletes snapshots according to the specified retention period (14 daily, 4 weekly, 12 monthly). This task used to run on my workstation, scheduled by a systemd timer unit. I've kept the same schedule and retention period as before. Now, instead of relying on my PC to be on and awake, the cleanup will occur more regularly. There's also the added benefit of getting the logs into Loki.
25 lines
462 B
YAML
25 lines
462 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: restic
|
|
labels:
|
|
app.kubernetes.io/name: restic
|
|
app.kubernetes.io/component: restic
|
|
spec:
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: kube-system
|
|
ports:
|
|
- port: 53
|
|
protocol: UDP
|
|
- port: 53
|
|
protocol: TCP
|
|
- to:
|
|
- ipBlock:
|
|
cidr: 172.30.0.15/32
|
|
ports:
|
|
- port: 443
|
|
podSelector: {}
|