-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcronjob.yaml
52 lines (52 loc) · 1.43 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
51
52
apiVersion: batch/v2alpha1
kind: CronJob
metadata:
name: cloudefficiency-cronjob
spec:
concurrencyPolicy: "Forbid"
schedule: "0 19 * * *"
jobTemplate:
spec:
backoffLimit: 2
activeDeadlineSeconds: 2400
completions: 1
template:
metadata:
name: cloudefficiency-pod
spec:
restartPolicy: Never
containers:
- name: cloudefficiency
image: $IMAGE
command: ["/usr/bin/time"]
args: ["-v", "./upload.sh"]
workingDir: /app
env:
- name: DATA_BUCKET
value: "$DATA_BUCKET"
- name: BUCKET
value: "$BUCKET"
volumeMounts:
- name: config
mountPath: "/app/report/config.json"
subPath: "config.json"
readOnly: true
- name: config
mountPath: "/app/frontend/src/config.js"
subPath: "config.js"
readOnly: true
- name: aws-credentials
mountPath: "/root/.aws/"
readOnly: true
resources:
limits:
memory: 8G
requests:
memory: 8G
volumes:
- name: config
secret:
secretName: cloudefficiency-config
- name: aws-credentials
secret:
secretName: cloudefficiency-aws-credentials