forked from containerd/nri
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample-device-inject.yaml
75 lines (75 loc) · 1.5 KB
/
sample-device-inject.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# Once this pod is running, you can verify the results by running
# kubectl exec -c c0 bbdev0 -- ls -ls /dev/nri-null
# kubectl exec -c c1 bbdev0 -- ls -ls /dev/nri-zero
# kubectl exec -c c2 bbdev0 -- mount | grep host-home
#
apiVersion: v1
kind: Pod
metadata:
name: bbdev0
labels:
app: bbdev0
annotations:
devices.nri.io/container.c0: |+
- path: /dev/nri-null
type: c
major: 1
minor: 3
devices.nri.io/container.c1: |+
- path: /dev/nri-zero
type: c
major: 1
minor: 5
mounts.nri.io/container.c2: |+
- source: /home
destination: /host-home
type: bind
options:
- bind
- ro
spec:
containers:
- name: c0
image: busybox
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- echo bbdev0c0 $(sleep inf)
resources:
requests:
cpu: 500m
memory: '100M'
limits:
cpu: 500m
memory: '100M'
- name: c1
image: busybox
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- echo bbdev0c1 $(sleep inf)
resources:
requests:
cpu: 1
memory: '100M'
limits:
cpu: 1
memory: '100M'
- name: c2
image: busybox
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- echo bbdev0c1 $(sleep inf)
resources:
requests:
cpu: 1
memory: '100M'
limits:
cpu: 1
memory: '100M'
terminationGracePeriodSeconds: 1