backups deployed using argo
This commit is contained in:
parent
57a4654f25
commit
49d281e938
@ -15,6 +15,17 @@ spec:
|
|||||||
hostname: restic-k3s-pod
|
hostname: restic-k3s-pod
|
||||||
# used by restic to identify the host
|
# used by restic to identify the host
|
||||||
containers:
|
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
|
- name: restic-base-container
|
||||||
image: restic/restic:latest
|
image: restic/restic:latest
|
||||||
command:
|
command:
|
||||||
|
@ -10,7 +10,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
initContainers:
|
||||||
- name: restic-base-container
|
- name: restic-base-container
|
||||||
args:
|
args:
|
||||||
# >- strips newlines
|
# >- strips newlines
|
||||||
|
@ -10,7 +10,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
initContainers:
|
||||||
- name: restic-base-container
|
- name: restic-base-container
|
||||||
args:
|
args:
|
||||||
# >- strips newlines
|
# >- strips newlines
|
||||||
|
18
kluster-deployments/backup/backup.application.yaml
Normal file
18
kluster-deployments/backup/backup.application.yaml
Normal 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
|
5
kluster-deployments/backup/kustomization.yaml
Normal file
5
kluster-deployments/backup/kustomization.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- backup.application.yaml
|
||||||
|
- prune.application.yaml
|
18
kluster-deployments/backup/prune.application.yaml
Normal file
18
kluster-deployments/backup/prune.application.yaml
Normal 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
|
@ -11,3 +11,4 @@ resources:
|
|||||||
- immich/
|
- immich/
|
||||||
- homeassistant/
|
- homeassistant/
|
||||||
- ntfy/
|
- ntfy/
|
||||||
|
- backup/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user