blob: 3e459e197b3ed027d63e925ec59eac18ecd87409 [file] [log] [blame]
Hyunsun Moon1eedd032019-08-19 02:36:44 -05001{{/*
2Copyright 2018-present Open Networking Foundation
3Copyright 2018 Intel Corporation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16*/}}
17---
18apiVersion: apps/v1
19kind: DaemonSet
20metadata:
21 name: sriov-device-plugin
22spec:
23 selector:
24 matchLabels:
25 name: sriov-device-plugin
26 template:
27 metadata:
28 labels:
29 name: sriov-device-plugin
30 spec:
31 hostNetwork: true
32 hostPID: true
33 initContainers:
34 - name: init-sriov-cni
35 image: {{ .Values.images.tags.omecCni }}
36 imagePullPolicy: {{ .Values.images.pullPolicy }}
37 command: [ "bash", "-c" ]
38 args:
39 - cp /tmp/cni/bin/{sriov,vfioveth,centralip,jq} /host/opt/cni/bin/
40 volumeMounts:
41 - name: cni-bin
42 mountPath: /host/opt/cni/bin
43 containers:
44 - name: sriov-device-plugin
45 image: {{ .Values.images.tags.sriovDp }}
46 imagePullPolicy: {{ .Values.images.pullPolicy }}
47 command: [ "/bin/sh", "-c", "--" ]
48 args: [ "sriovdp --logtostderr 10;" ]
49 securityContext:
50 privileged: true
51 volumeMounts:
52 - mountPath: /var/lib/kubelet/
53 name: devicesock
54 readOnly: false
55 - mountPath: /sys
56 name: net
57 readOnly: true
58 - name: sriov-config
59 mountPath: /etc/pcidp
60 volumes:
61 - name: devicesock
62 hostPath:
63 path: /var/lib/kubelet/
64 - name: net
65 hostPath:
66 path: /sys
67 - name: sriov-config
68 configMap:
69 name: sriov-config
70 - name: cni-bin
71 hostPath:
72 path: /opt/cni/bin