blob: 4bafb4fee8ed29047a314c621f98622fbddb1236 [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
Hyunsun Moon1eedd032019-08-19 02:36:44 -050018---
19apiVersion: apps/v1
20kind: DaemonSet
21metadata:
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070022 name: omec-sriov-plugin
23 labels:
24{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }}
Hyunsun Moon1eedd032019-08-19 02:36:44 -050025spec:
26 selector:
27 matchLabels:
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070028{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 6 }}
Hyunsun Moon1eedd032019-08-19 02:36:44 -050029 template:
30 metadata:
31 labels:
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070032{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 8 }}
Hyunsun Moon1eedd032019-08-19 02:36:44 -050033 spec:
34 hostNetwork: true
35 hostPID: true
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070036 nodeSelector:
37 beta.kubernetes.io/arch: amd64
Hyunsun Moon1eedd032019-08-19 02:36:44 -050038 initContainers:
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070039 - name: init-omec-sriov-plugin
Hyunsun Moon1eedd032019-08-19 02:36:44 -050040 image: {{ .Values.images.tags.omecCni }}
41 imagePullPolicy: {{ .Values.images.pullPolicy }}
42 command: [ "bash", "-c" ]
43 args:
Hyunsun Moonc4a7d542019-08-22 18:53:40 -050044 - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/
Hyunsun Moon1eedd032019-08-19 02:36:44 -050045 volumeMounts:
46 - name: cni-bin
47 mountPath: /host/opt/cni/bin
48 containers:
49 - name: sriov-device-plugin
Hyunsun Moonfbc2d052019-10-30 10:13:09 -070050 image: {{ .Values.images.tags.sriovPlugin }}
Hyunsun Moon1eedd032019-08-19 02:36:44 -050051 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