File: sample-device-inject.yaml

package info (click to toggle)
golang-github-containerd-nri 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,980 kB
  • sloc: makefile: 117; sh: 45
file content (75 lines) | stat: -rw-r--r-- 1,538 bytes parent folder | download | duplicates (2)
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