-
Notifications
You must be signed in to change notification settings - Fork 0
/
cronjob.yaml
39 lines (39 loc) · 924 Bytes
/
cronjob.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
34
35
36
37
38
39
apiVersion: batch/v1
kind: CronJob
metadata:
name: snapshot-grabber
namespace: frigate
spec:
schedule: "0,30 * * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: Never
volumes:
- name: snapshots
persistentVolumeClaim:
claimName: snapshots
containers:
- name: grabber
image: curlimages/curl:8.11.0
command:
- /bin/sh
- -c
- curl -v "http://frigate:5000/api/plant_cam/latest.jpg" -o "/snapshots/$(date +%s).jpg"
volumeMounts:
- mountPath: "/snapshots"
name: snapshots
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: snapshots
namespace: frigate
spec:
accessModes:
- ReadWriteMany
storageClassName: "nfs-client"
resources:
requests:
storage: 20Gi