Files
git.limbosolutions.com/backup/borgbackup-cockpit-deploy.yaml
2025-03-18 00:11:15 +00:00

69 lines
1.7 KiB
YAML

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