blob: 4bafb4fee8ed29047a314c621f98622fbddb1236 [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
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
18---
19apiVersion: apps/v1
20kind: DaemonSet
21metadata:
22 name: omec-sriov-plugin
23 labels:
24{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }}
25spec:
26 selector:
27 matchLabels:
28{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 6 }}
29 template:
30 metadata:
31 labels:
32{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 8 }}
33 spec:
34 hostNetwork: true
35 hostPID: true
36 nodeSelector:
37 beta.kubernetes.io/arch: amd64
38 initContainers:
39 - name: init-omec-sriov-plugin
40 image: {{ .Values.images.tags.omecCni }}
41 imagePullPolicy: {{ .Values.images.pullPolicy }}
42 command: [ "bash", "-c" ]
43 args:
44 - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/
45 volumeMounts:
46 - name: cni-bin
47 mountPath: /host/opt/cni/bin
48 containers:
49 - name: sriov-device-plugin
50 image: {{ .Values.images.tags.sriovPlugin }}
51 imagePullPolicy: {{ .Values.images.pullPolicy }}
52 command: [ "/bin/sh", "-c", "--" ]
53 args: [ "sriovdp --logtostderr 10;" ]
54 securityContext:
55 privileged: true
56 volumeMounts:
57 - mountPath: /var/lib/kubelet/
58 name: devicesock
59 readOnly: false
60 - mountPath: /sys
61 name: net
62 readOnly: true
63 - name: sriov-config
64 mountPath: /etc/pcidp
65 volumes:
66 - name: devicesock
67 hostPath:
68 path: /var/lib/kubelet/
69 - name: net
70 hostPath:
71 path: /sys
72 - name: sriov-config
73 configMap:
74 name: sriov-config
75 - name: cni-bin
76 hostPath:
77 path: /opt/cni/bin