-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcron.yaml
33 lines (33 loc) · 816 Bytes
/
cron.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# soba backup schedule
apiVersion: batch/v1
kind: CronJob
metadata:
name: soba
namespace: soba
spec:
# cron format: https://en.wikipedia.org/wiki/Cron
# this runs soba every hour
schedule: "0 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: soba
image: jonhadfield/soba:latest
envFrom:
- secretRef:
name: soba
- configMapRef:
name: soba
imagePullPolicy: IfNotPresent
volumeMounts:
- name: soba
# always keep as backup
mountPath: "/backup"
restartPolicy: Never
volumes:
- name: soba
persistentVolumeClaim:
claimName: soba