blob: 0624fb2d25a4096890299b8e05d13ee6c73a9dea [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
Hyunsun Moon8da17882020-10-14 21:28:44 -050029 {{- if .Values.images.credentials }}
30 imagePullSecrets:
31 - name: {{ .Release.Name }}.registry
32 {{- end }}
Hyunsun Moon0e39f272020-09-10 15:38:04 -070033 initContainers:
34 - name: init-sriov-plugin
35 image: {{ .Values.images.tags.omecCni }}
36 imagePullPolicy: {{ .Values.images.pullPolicy }}
37 command: [ "bash", "-c" ]
38 args:
39 - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /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.sriovPlugin }}
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