blob: 9b358a9cf0f00269ec389c8e35d1401429fc5ce5 [file] [log] [blame]
Wei-Yu Chen450a98a2019-01-15 16:56:30 -08001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16---
17kind: DaemonSet
18apiVersion: apps/v1
19metadata:
20 name: sriov-device-plugin
21 namespace: kube-system
22spec:
23 selector:
24 matchLabels:
25 name: sriov-device-plugin
26 template:
27 metadata:
28 labels:
29 name: sriov-device-plugin
30 spec:
31 serviceAccountName: sriov-dp
32 initContainers:
33 - name: init-sriov-dp
34 image: ngick8stesting/aio-cni:k8s-1.13
35 command: [ "bash", "-c" ]
36 args:
37 - cp /tmp/cni/bin/{multus,sriov,centralip} /host/opt/cni/bin/;
38 echo "Restarting crio/containerd, kubelet";
39 systemctl daemon-reload;
40 systemctl restart containerd;
41 systemctl restart crio;
42 systemctl restart kubelet;
43 volumeMounts:
44 - name: usr-bin
45 mountPath: /host/usr/bin
46 - name: cni-bin
47 mountPath: /host/opt/cni/bin
48 - name: multus-cm
49 mountPath: /tmp/etc/cni/net.d
50 - name: multus-certs
51 mountPath: /tmp/multus
52 - name: cni-conf
53 mountPath: /host/etc/cni/net.d
54 - name: dbus
55 mountPath: /var/run/dbus
56 - name: systemd
57 mountPath: /run/systemd
58 containers:
59 - name: sriov-device-plugin
60 image: ngick8stesting/aio-cni:k8s-1.13
61 imagePullPolicy: IfNotPresent
62 command: [ "/bin/sh", "-c" ]
63 args:
64 - /usr/bin/sriovdp --logtostderr -v 10;
65 echo "exit status $?";
66 volumeMounts:
67 - mountPath: /var/lib/kubelet/device-plugins/
68 name: devicesock
69 readOnly: false
70 - mountPath: /sys/class/net/
71 name: net
72 readOnly: true
73 - mountPath: /etc/pcidp/
74 name: sriov-config
75 readOnly: false
76 volumes:
77 - name: sriov-config
78 configMap:
79 name: sriov-config
80 - name: usr-bin
81 hostPath:
82 path: /usr/bin
83 - name: cni-bin
84 hostPath:
85 path: /opt/cni/bin
86 - name: multus-cm
87 configMap:
88 name: multus-conf
89 - name: multus-certs
90 configMap:
91 defaultMode: 511
92 name: multus-certs
93 - name: cni-conf
94 hostPath:
95 path: /etc/cni/net.d
96 - name: dbus
97 hostPath:
98 path: /var/run/dbus
99 - name: systemd
100 hostPath:
101 path: /run/systemd
102 - name: net
103 hostPath:
104 path: /sys/class/net
105 - name: devicesock
106 hostPath:
107 path: /var/lib/kubelet/device-plugins/
108 hostNetwork: true
109 hostPID: true