initial migration
This commit is contained in:
64
unused/backup/base/cronjob.yaml
Normal file
64
unused/backup/base/cronjob.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: restic-backblaze
|
||||
|
||||
spec:
|
||||
schedule: "0 2 * * *"
|
||||
# at 2:00, every tuesday and saturday
|
||||
successfulJobsHistoryLimit: 2
|
||||
failedJobsHistoryLimit: 2
|
||||
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
# nodeSelector:
|
||||
# kubernetes.io/arch: arm64
|
||||
# TODO no arm64 nodes anymore
|
||||
restartPolicy: Never
|
||||
hostname: restic-k3s-pod
|
||||
# used by restic to identify the host
|
||||
containers:
|
||||
- name: restic-base-container
|
||||
image: restic/restic:latest
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
# >- strips newlines
|
||||
# RESTIC_ARGS Can be for instance: --verbose --dry-run
|
||||
args: []
|
||||
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: backup-nfs-access
|
||||
- mountPath: /credentials
|
||||
name: restic-credentials
|
||||
|
||||
env:
|
||||
- name: RESTIC_REPOSITORY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: restic-credentials
|
||||
key: RESTIC_REPOSITORY
|
||||
- name: B2_ACCOUNT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: restic-credentials
|
||||
key: B2_ACCOUNT_ID
|
||||
- name: B2_ACCOUNT_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: restic-credentials
|
||||
key: B2_ACCOUNT_KEY
|
||||
- name: RESTIC_PASSWORD_FILE
|
||||
value: /credentials/restic-password
|
||||
|
||||
volumes:
|
||||
- name: backup-nfs-access
|
||||
persistentVolumeClaim:
|
||||
claimName: backup-nfs-access
|
||||
- name: restic-credentials
|
||||
secret:
|
||||
secretName: restic-credentials
|
||||
optional: false
|
5
unused/backup/base/kustomization.yaml
Normal file
5
unused/backup/base/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./cronjob.yaml
|
||||
- ./restic-credentials.secret.yaml
|
Reference in New Issue
Block a user