backup.job.yaml 759 B

1234567891011121314151617181920212223242526272829
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: backup
  5. spec:
  6. template:
  7. spec:
  8. containers:
  9. - args: ["backup", "--repo", "/data/repo", "--insecure-no-password", "/data/glusterfs"]
  10. image: restic/restic:0.17.2
  11. imagePullPolicy: IfNotPresent
  12. name: restic
  13. volumeMounts:
  14. - name: restic-repo-vol
  15. mountPath: /data/repo
  16. - name: backup-data-vol
  17. mountPath: /data/glusterfs
  18. volumes:
  19. - name: restic-repo-vol
  20. hostPath:
  21. path: /data/backup
  22. type: Directory
  23. - name: backup-data-vol
  24. hostPath:
  25. path: /mnt
  26. type: Directory
  27. restartPolicy: Never
  28. nodeSelector:
  29. kubernetes.io/hostname: raspberrypi4