Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [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 | */}} |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 17 | |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 18 | --- |
| 19 | apiVersion: apps/v1 |
| 20 | kind: DaemonSet |
| 21 | metadata: |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 22 | name: omec-sriov-plugin |
| 23 | labels: |
| 24 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 4 }} |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 25 | spec: |
| 26 | selector: |
| 27 | matchLabels: |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 28 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 6 }} |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 29 | template: |
| 30 | metadata: |
| 31 | labels: |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 32 | {{ tuple "omec-sriov-plugin" . | include "omec-data-plane-cni.metadata_labels" | indent 8 }} |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 33 | spec: |
| 34 | hostNetwork: true |
| 35 | hostPID: true |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 36 | nodeSelector: |
| 37 | beta.kubernetes.io/arch: amd64 |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 38 | initContainers: |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 39 | - name: init-omec-sriov-plugin |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 40 | image: {{ .Values.images.tags.omecCni }} |
| 41 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 42 | command: [ "bash", "-c" ] |
| 43 | args: |
Hyunsun Moon | c4a7d54 | 2019-08-22 18:53:40 -0500 | [diff] [blame] | 44 | - cp /tmp/cni/bin/{sriov,vfioveth,jq,static} /host/opt/cni/bin/ |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 45 | volumeMounts: |
| 46 | - name: cni-bin |
| 47 | mountPath: /host/opt/cni/bin |
| 48 | containers: |
| 49 | - name: sriov-device-plugin |
Hyunsun Moon | fbc2d05 | 2019-10-30 10:13:09 -0700 | [diff] [blame] | 50 | image: {{ .Values.images.tags.sriovPlugin }} |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 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 |