This repository was archived by the owner on Apr 20, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +53
-6
lines changed Expand file tree Collapse file tree 4 files changed +53
-6
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ FROM fedora:27
2
2
3
3
COPY kvm /kvm
4
4
5
- CMD ["/kvm" ]
5
+ ENTRYPOINT ["/kvm" ]
Original file line number Diff line number Diff line change @@ -33,13 +33,20 @@ sudo ./kvm -v 3 -logtostderr
33
33
34
34
### Docker
35
35
```
36
- docker run -it -v /dev:/dev -v /sys:/sys -v /lib/modules:/lib/modules -v / var/lib/kubelet/device-plugins:/var/lib/kubelet/device-plugins --privileged --cap-add=ALL kvm:latest /bin/bash
36
+ docker run -it -v /var/lib/kubelet/device-plugins:/var/lib/kubelet/device-plugins --privileged --cap-add=ALL kvm:latest /bin/bash
37
37
(in docker image) ./kvm -v 3 -logtostderr
38
38
```
39
39
40
40
## As a DaemonSet
41
41
42
- NOTE: This process is not finalized yet.
42
+ ```
43
+ # Deploy the device plugin
44
+ kubectl apply -f manifests/kvm-ds.yml
45
+
46
+ # Optionally you can now test it using an example consumer
47
+ kubectl apply -f docs/kvm/consumer.yml
48
+ kubectl exec -it kvm-consumer -- ls /dev/kvm
49
+ ```
43
50
44
51
## API
45
52
@@ -48,7 +55,7 @@ Node description:
48
55
``` yaml
49
56
Capacity :
50
57
...
51
- devices.kubevirt.io/kvm : 3
58
+ devices.kubevirt.io/kvm : " 3 "
52
59
...
53
60
```
54
61
61
68
...
62
69
resources :
63
70
requests :
64
- devices.kubevirt.io/kvm : 1
71
+ devices.kubevirt.io/kvm : " 1 "
65
72
limits :
66
- devices.kubevirt.io/kvm : 1
73
+ devices.kubevirt.io/kvm : " 1 "
67
74
` ` `
68
75
69
76
## Issues
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Pod
3
+ metadata :
4
+ name : kvm-consumer
5
+ spec :
6
+ containers :
7
+ - name : busybox
8
+ image : busybox
9
+ command : ["/bin/sleep", "123"]
10
+ resources :
11
+ limits :
12
+ devices.kubevirt.io/kvm : 1
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : DaemonSet
3
+ metadata :
4
+ labels :
5
+ name : device-plugin-kvm
6
+ name : device-plugin-kvm
7
+ spec :
8
+ selector :
9
+ matchLabels :
10
+ name : device-plugin-kvm
11
+ template :
12
+ metadata :
13
+ labels :
14
+ name : device-plugin-kvm
15
+ spec :
16
+ containers :
17
+ - name : device-plugin-kvm
18
+ image : quay.io/kubevirt/device-plugin-kvm
19
+ args : ["-v3", "-logtostderr"]
20
+ securityContext :
21
+ privileged : true
22
+ volumeMounts :
23
+ - name : device-plugin
24
+ mountPath : /var/lib/kubelet/device-plugins
25
+ volumes :
26
+ - name : device-plugin
27
+ hostPath :
28
+ path : /var/lib/kubelet/device-plugins
You can’t perform that action at this time.
0 commit comments