-
Notifications
You must be signed in to change notification settings - Fork 0
/
node-feature-discovery-libvirt-daemonset.yaml.template
114 lines (113 loc) · 2.73 KB
/
node-feature-discovery-libvirt-daemonset.yaml.template
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: v1
kind: ServiceAccount
metadata:
name: node-feature-discovery
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: node-feature-discovery
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
verbs:
- get
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: node-feature-discovery
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: node-feature-discovery
subjects:
- kind: ServiceAccount
name: node-feature-discovery
namespace: default
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
name: device-plugin-kvm
name: device-plugin-kvm
spec:
selector:
matchLabels:
name: device-plugin-kvm
template:
metadata:
labels:
name: device-plugin-kvm
spec:
containers:
- name: device-plugin-kvm
image: quay.io/kubevirt/device-plugin-kvm
args: ["-v", "3", "-logtostderr"]
securityContext:
privileged: true
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: node-feature-discovery
name: node-feature-discovery
spec:
selector:
matchLabels:
app: node-feature-discovery
template:
metadata:
labels:
app: node-feature-discovery
spec:
hostNetwork: true
serviceAccount: node-feature-discovery
containers:
- env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: quay.io/kubernetes_incubator/node-feature-discovery:v0.3.0
name: node-feature-discovery
args:
- "--sleep-interval=60s"
volumeMounts:
- name: host-sys
mountPath: "/host-sys"
- name: virsh-share
mountPath: "/usr/share/virsh/"
- image: kubevirt/libvirt
command: ["/bin/sh","-c"]
args: ["libvirtd -d; chmod o+rw /dev/kvm; while true; do virsh domcapabilities --machine q35 --arch x86_64 --virttype kvm > /usr/share/virsh/virsh_domcapabilities.xml; sleep 60; done"]
imagePullPolicy: Always
name: libvirt
resources:
requests:
devices.kubevirt.io/kvm: "1"
limits:
devices.kubevirt.io/kvm: "1"
volumeMounts:
- name: virsh-share
mountPath: "/usr/share/virsh/"
volumes:
- name: host-sys
hostPath:
path: "/sys"
- name: virsh-share
emptyDir: {}