基本框架
This commit is contained in:
27
ansible/files/openlist/openlist-backup-cronjob.yaml
Normal file
27
ansible/files/openlist/openlist-backup-cronjob.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# docs/05-06-openlist挂载网盘与自动备份.md — 替换镜像与 PVC 名
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: openlist-backup
|
||||
namespace: default
|
||||
spec:
|
||||
schedule: "0 3 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: openlist-backup
|
||||
image: your-registry/openlist-backup:latest
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /backup.sh
|
||||
volumeMounts:
|
||||
- name: backup-target
|
||||
mountPath: /backup
|
||||
volumes:
|
||||
- name: backup-target
|
||||
persistentVolumeClaim:
|
||||
claimName: openlist-backup-pvc
|
||||
restartPolicy: OnFailure
|
||||
Reference in New Issue
Block a user