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
22
33COPY kvm /kvm
44
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
3333
3434### Docker
3535```
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
3737(in docker image) ./kvm -v 3 -logtostderr
3838```
3939
4040## As a DaemonSet
4141
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+ ```
4350
4451## API
4552
@@ -48,7 +55,7 @@ Node description:
4855``` yaml
4956Capacity :
5057 ...
51- devices.kubevirt.io/kvm : 3
58+ devices.kubevirt.io/kvm : " 3 "
5259 ...
5360```
5461
6168 ...
6269 resources :
6370 requests :
64- devices.kubevirt.io/kvm : 1
71+ devices.kubevirt.io/kvm : " 1 "
6572 limits :
66- devices.kubevirt.io/kvm : 1
73+ devices.kubevirt.io/kvm : " 1 "
6774` ` `
6875
6976## 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