-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoom_test.yaml
43 lines (43 loc) · 1.06 KB
/
oom_test.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
apiVersion: batch/v1
kind: CronJob
metadata:
name: RecoverOOM-test-cron
namespace: RecoverOOM
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
activeDeadlineSeconds: 60
template:
metadata:
labels:
purpose: demonstrate-oom
spec:
restartPolicy: Never
containers:
- name: RecoverOOM-test
image: ubuntu
command:
- bash
- -c
args:
- |
echo PID=$$
for i in {0..9}
do
eval a$i'=$(head --bytes 5000000 /dev/zero |cat -v)'
echo $((i++));
done
resources:
requests:
memory: 25Mi
cpu: 1
limits:
memory: 25Mi
cpu: 1
tolerations:
- effect: NoSchedule
key: zeroScale
operator: Equal
nodeSelector:
node.kubernetes.io/instance-type: n1-highmem-2