blob: ca75a36091fe76f5e78cebbdf6d0d208506fc0bb [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*/}}
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060017
18{{- if .Values.config.sriov.enabled }}
Hyunsun Moon1eedd032019-08-19 02:36:44 -050019---
20apiVersion: apps/v1
21kind: DaemonSet
22metadata:
23 name: sriov-device-plugin
24spec:
25 selector:
26 matchLabels:
27 name: sriov-device-plugin
28 template:
29 metadata:
30 labels:
31 name: sriov-device-plugin
32 spec:
33 hostNetwork: true
34 hostPID: true
35 initContainers:
36 - name: init-sriov-cni
37 image: {{ .Values.images.tags.omecCni }}
38 imagePullPolicy: {{ .Values.images.pullPolicy }}
39 command: [ "bash", "-c" ]
40 args:
Hyunsun Moonc4a7d542019-08-22 18:53:40 -050041 - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/
Hyunsun Moon1eedd032019-08-19 02:36:44 -050042 volumeMounts:
43 - name: cni-bin
44 mountPath: /host/opt/cni/bin
45 containers:
46 - name: sriov-device-plugin
47 image: {{ .Values.images.tags.sriovDp }}
48 imagePullPolicy: {{ .Values.images.pullPolicy }}
49 command: [ "/bin/sh", "-c", "--" ]
50 args: [ "sriovdp --logtostderr 10;" ]
51 securityContext:
52 privileged: true
53 volumeMounts:
54 - mountPath: /var/lib/kubelet/
55 name: devicesock
56 readOnly: false
57 - mountPath: /sys
58 name: net
59 readOnly: true
60 - name: sriov-config
61 mountPath: /etc/pcidp
62 volumes:
63 - name: devicesock
64 hostPath:
65 path: /var/lib/kubelet/
66 - name: net
67 hostPath:
68 path: /sys
69 - name: sriov-config
70 configMap:
71 name: sriov-config
72 - name: cni-bin
73 hostPath:
74 path: /opt/cni/bin
Hyunsun Moon7a007bb2019-08-19 16:41:36 -060075{{- end }}