-
Notifications
You must be signed in to change notification settings - Fork 4
/
job.yml
41 lines (41 loc) · 1.08 KB
/
job.yml
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
apiVersion: batch/v1
kind: Job
metadata:
# Prefix name of job with user and timestamp
name: $USER-$TS
spec:
backoffLimit: 0
# Delete the log after a minute
ttlSecondsAfterFinished: 60
template:
spec:
containers:
- name: magic
image: $DOCKERHUB_ACCOUNT/ubuntu
imagePullPolicy: Always
volumeMounts:
- mountPath: /scratch
name: scratch-volume
- mountPath: /root/.aws
name: s3-credentials
readOnly: true
resources:
requests:
cpu: "1"
memory: "1G"
ephemeral-storage: "2M"
limits:
cpu: "2"
memory: "2G"
ephemeral-storage: "4M"
# command: ["/bin/bash", "-c"]
# args: ['for i in {1..100}; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done']
command: ["python3", "run.py"]
args: ["-c", "1000", "foobar"]
restartPolicy: Never
volumes:
- name: scratch-volume
emptyDir: {}
- name: s3-credentials
secret:
secretName: shared-s3-credentials