blob: b9bb1cb3f0d8d01d6e11f52596f5432d2c7cf5bf [file] [log] [blame]
Hyunsun Moon0e39f272020-09-10 15:38:04 -07001{{/*
2# Copyright 2018-present Open Networking Foundation
3# Copyright 2018 Intel Corporation
4
5# SPDX-License-Identifier: Apache-2.0
6# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
7*/}}
8
9---
10apiVersion: apps/v1
11kind: DaemonSet
12metadata:
13 name: sriov-plugin
14 labels:
15{{ tuple "sriov-plugin" . | include "omec-upf-cni.metadata_labels" | indent 4 }}
16spec:
17 selector:
18 matchLabels:
19{{ tuple "sriov-plugin" . | include "omec-upf-cni.metadata_labels" | indent 6 }}
20 template:
21 metadata:
22 labels:
23{{ tuple "sriov-plugin" . | include "omec-upf-cni.metadata_labels" | indent 8 }}
24 spec:
25 hostNetwork: true
26 hostPID: true
27 nodeSelector:
28 beta.kubernetes.io/arch: amd64
29 initContainers:
30 - name: init-sriov-plugin
31 image: {{ .Values.images.tags.omecCni }}
32 imagePullPolicy: {{ .Values.images.pullPolicy }}
33 command: [ "bash", "-c" ]
34 args:
35 - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/
36 volumeMounts:
37 - name: cni-bin
38 mountPath: /host/opt/cni/bin
39 containers:
40 - name: sriov-device-plugin
41 image: {{ .Values.images.tags.sriovPlugin }}
42 imagePullPolicy: {{ .Values.images.pullPolicy }}
43 command: [ "/bin/sh", "-c", "--" ]
44 args: [ "sriovdp --logtostderr 10;" ]
45 securityContext:
46 privileged: true
47 volumeMounts:
48 - mountPath: /var/lib/kubelet/
49 name: devicesock
50 readOnly: false
51 - mountPath: /sys
52 name: net
53 readOnly: true
54 - name: sriov-config
55 mountPath: /etc/pcidp
56 volumes:
57 - name: devicesock
58 hostPath:
59 path: /var/lib/kubelet/
60 - name: net
61 hostPath:
62 path: /sys
63 - name: sriov-config
64 configMap:
65 name: sriov-config
66 - name: cni-bin
67 hostPath:
68 path: /opt/cni/bin