-
Notifications
You must be signed in to change notification settings - Fork 0
/
cronjob.yaml
50 lines (50 loc) · 1.37 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
apiVersion: batch/v1
kind: CronJob
metadata:
name: ds
spec:
schedule: "* * * * *" # "0 0 * * *" should be once per day but testing every minute is more convenient
jobTemplate:
spec:
template:
spec:
containers:
- name: domain-scarper
image: domain-scraper
command: [ "domain-scraper", "-sS" ]
# paths defined below are relative to mounted emails-volume
env:
- name: INPUT_DIR
value: "emails/input"
- name: ARCHIVE_DIR
value: "emails/archive"
- name: DB_FILE
value: "db/email_database.json"
envFrom:
- secretRef:
name: email-secrets
volumeMounts:
- mountPath: /domain-scraper/emails
name: emails-volume
- mountPath: /domain-scraper/db
name: db-storage
imagePullPolicy: Never
restartPolicy: Never
volumes:
- name: emails-volume
hostPath:
path: /hosthome/domain-scraper-workdir/emails
- name: db-storage
persistentVolumeClaim:
claimName: db-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: db-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi