Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 1 | {{/* |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame^] | 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # Copyright 2018 Intel Corporation |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 4 | |
Jeremy Ronquillo | ec2d3e4 | 2020-06-05 11:33:39 -0700 | [diff] [blame^] | 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only |
Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame] | 7 | */}} |
| 8 | |
| 9 | --- |
| 10 | apiVersion: apps/v1 |
| 11 | kind: DaemonSet |
| 12 | metadata: |
| 13 | name: omec-sriov-plugin |
| 14 | labels: |
| 15 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }} |
| 16 | spec: |
| 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 |