-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpod.j2
58 lines (58 loc) · 1.4 KB
/
pod.j2
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
53
54
55
56
57
58
apiVersion: v1
kind: Pod
metadata:
name: cyclictest
annotations:
cpu-load-balancing.crio.io: "true"
labels:
app.kubernetes.io/name: cyclictest
app.kubernetes.io/version: latest
spec:
initContainers:
- name: init-cyclictest
image: quay.io/ayosef/cyclictest:latest
command: ['sleep', '60']
containers:
- name: cyclictest
namespace: openshift-monitoring
volumeMounts:
- mountPath: /dev/cpu_dma_latency
name: dev-cpu-dma-latency
image: quay.io/ayosef/cyclictest:latest
imagePullPolicy: Always
resources:
requests:
cpu: {{ cpu }}
memory: 2G
limits:
cpu: {{ cpu }}
memory: 2G
command: ["cyclictest"]
args:
- --duration={{ duration }}
- --histofall=30
- --mlockall
- --priority=95
- --interval=1000
- --distance=0
- --smi
- -a
- -t {{ cpu }}
- -n
securityContext:
privileged: true
capabilities:
add:
- ipc_lock
- sys_nice
- sys_rawio
nodeSelector:
node-role.kubernetes.io/{{ cnf_node_selector }}: ""
volumes:
- name: dev-cpu-dma-latency
hostPath:
path: /dev/cpu_dma_latency
runtimeClassName: performance-{{ profile_name }}
restartPolicy: Never
serviceAccount: node-exporter
serviceAccountName: node-exporter