backups deployed using argo

This commit is contained in:
Remy Moll 2023-11-21 23:18:47 +01:00
parent 57a4654f25
commit 49d281e938
7 changed files with 55 additions and 2 deletions

View File

@ -15,6 +15,17 @@ spec:
hostname: restic-k3s-pod
# used by restic to identify the host
containers:
# run after completion of initContainers
- name: ntfy-command-send
image: curl
command: ["curl"]
args:
- "-H"
- "Title: $(cat /proc/sys/kernel/hostname)"
- "-d"
- "Restic operation to gdrive finished"
- "https://ntfy.kluster.moll.re/backup"
initContainers:
- name: restic-base-container
image: restic/restic:latest
command:

View File

@ -10,7 +10,7 @@ spec:
spec:
template:
spec:
containers:
initContainers:
- name: restic-base-container
args:
# >- strips newlines

View File

@ -10,7 +10,7 @@ spec:
spec:
template:
spec:
containers:
initContainers:
- name: restic-base-container
args:
# >- strips newlines

View File

@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: restic-backup-application
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/moll-re/k3s-infra.git
targetRevision: HEAD
path: infrastructure/backup/overlays/backup
destination:
server: https://kubernetes.default.svc
namespace: backup
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- backup.application.yaml
- prune.application.yaml

View File

@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: restic-prune-application
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/moll-re/k3s-infra.git
targetRevision: HEAD
path: infrastructure/backup/overlays/prune
destination:
server: https://kubernetes.default.svc
namespace: backup
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@ -11,3 +11,4 @@ resources:
- immich/
- homeassistant/
- ntfy/
- backup/