backup revision
This commit is contained in:
68
backup/borgbackup-cockpit-deploy.yaml
Normal file
68
backup/borgbackup-cockpit-deploy.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: borgbackup-cockpit
|
||||
namespace: git-limbosolutions-com
|
||||
labels:
|
||||
app: borgbackup-cockpit
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: borgbackup-cockpit
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: borgbackup-cockpit
|
||||
spec:
|
||||
containers:
|
||||
- name: borg-client
|
||||
image: git.limbosolutions.com/kb/borg-backup:latest
|
||||
resources:
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
env:
|
||||
- name: BORG_REPO
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-backup-secret
|
||||
key: BORG_REPO
|
||||
|
||||
- name: BORG_PASSPHRASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-backup-secret
|
||||
key: BORG_PASSPHRASE
|
||||
|
||||
- name: BORG_RSH
|
||||
value: ssh -o StrictHostKeyChecking=no
|
||||
|
||||
- name: BORG_KEY_FILE
|
||||
value: /root/.borg/key
|
||||
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
while true; do
|
||||
sleep 1s
|
||||
done
|
||||
|
||||
volumeMounts:
|
||||
|
||||
- name: gitea-backup-secret
|
||||
mountPath: /root/.borg/key
|
||||
subPath: BORG_KEY_FILE
|
||||
|
||||
- name: gitea-backup-secret
|
||||
mountPath: /root/.ssh/id_rsa
|
||||
subPath: SSH_ID_RSA
|
||||
volumes:
|
||||
- name: gitea-backup-secret
|
||||
secret:
|
||||
secretName: gitea-backup-secret
|
||||
defaultMode: 0600
|
||||
|
||||
Reference in New Issue
Block a user