Jeremy Ronquillo | 223db00 | 2020-06-05 10:28:22 -0700 | [diff] [blame^] | 1 | {{/* |
| 2 | Copyright 2018-present Open Networking Foundation |
| 3 | Copyright 2018 Intel Corporation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | */}} |
| 17 | |
| 18 | --- |
| 19 | apiVersion: apps/v1 |
| 20 | kind: DaemonSet |
| 21 | metadata: |
| 22 | name: omec-sriov-plugin |
| 23 | labels: |
| 24 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }} |
| 25 | spec: |
| 26 | selector: |
| 27 | matchLabels: |
| 28 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 6 }} |
| 29 | template: |
| 30 | metadata: |
| 31 | labels: |
| 32 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 8 }} |
| 33 | spec: |
| 34 | hostNetwork: true |
| 35 | hostPID: true |
| 36 | nodeSelector: |
| 37 | beta.kubernetes.io/arch: amd64 |
| 38 | initContainers: |
| 39 | - name: init-omec-sriov-plugin |
| 40 | image: {{ .Values.images.tags.omecCni }} |
| 41 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 42 | command: [ "bash", "-c" ] |
| 43 | args: |
| 44 | - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/ |
| 45 | volumeMounts: |
| 46 | - name: cni-bin |
| 47 | mountPath: /host/opt/cni/bin |
| 48 | containers: |
| 49 | - name: sriov-device-plugin |
| 50 | image: {{ .Values.images.tags.sriovPlugin }} |
| 51 | 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 |