45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: backup-verify
|
|
namespace: backup-system
|
|
spec:
|
|
schedule: "0 4 * * 1"
|
|
concurrencyPolicy: Forbid
|
|
failedJobsHistoryLimit: 3
|
|
successfulJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: chemavx-k8
|
|
restartPolicy: OnFailure
|
|
securityContext:
|
|
runAsUser: 0
|
|
containers:
|
|
- name: verify
|
|
image: rclone/rclone:latest
|
|
command: ["/bin/sh", "/scripts/verify.sh"]
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
volumeMounts:
|
|
- mountPath: /rclone/rclone.conf
|
|
name: rclone-conf
|
|
- mountPath: /scripts
|
|
name: scripts
|
|
volumes:
|
|
- name: rclone-conf
|
|
hostPath:
|
|
path: /home/chemavx/.config/rclone/rclone.conf
|
|
type: File
|
|
- name: scripts
|
|
hostPath:
|
|
path: /data/backups/scripts
|
|
type: Directory
|