blob: d4473304151b02fb9dc44b0a3deee3ce075f02cc [file] [log] [blame]
Jeremy Ronquillo223db002020-06-05 10:28:22 -07001{{/*
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07002# Copyright 2018-present Open Networking Foundation
3# Copyright 2018 Intel Corporation
Jeremy Ronquillo223db002020-06-05 10:28:22 -07004
Jeremy Ronquilloec2d3e42020-06-05 11:33:39 -07005# SPDX-License-Identifier: Apache-2.0
6# SPDX-License-Identifier: LicenseRef-ONF-Member-Only
Jeremy Ronquillo223db002020-06-05 10:28:22 -07007*/}}
8
9---
10apiVersion: apps/v1
11kind: DaemonSet
12metadata:
13 name: omec-sriov-plugin
14 labels:
15{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }}
16spec:
17 selector:
18 matchLabels:
19{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 6 }}
20 template:
21 metadata:
22 labels:
23{{ tuple "omec-sriov-plugin" . | include "omec-data-plane-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-omec-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