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 | |
| 18 | {{- if .Values.config.sriov.enabled }} |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 19 | --- |
| 20 | apiVersion: apps/v1 |
| 21 | kind: DaemonSet |
| 22 | metadata: |
| 23 | name: sriov-device-plugin |
| 24 | spec: |
| 25 | selector: |
| 26 | matchLabels: |
| 27 | name: sriov-device-plugin |
| 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | name: sriov-device-plugin |
| 32 | spec: |
| 33 | hostNetwork: true |
| 34 | hostPID: true |
| 35 | initContainers: |
| 36 | - name: init-sriov-cni |
| 37 | image: {{ .Values.images.tags.omecCni }} |
| 38 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 39 | command: [ "bash", "-c" ] |
| 40 | args: |
Hyunsun Moon | 7a921d1 | 2019-08-21 20:52:09 -0500 | [diff] [blame^] | 41 | - cp /tmp/cni/bin/{sriov,vfioveth,static} /host/opt/cni/bin/ |
Hyunsun Moon | 1eedd03 | 2019-08-19 02:36:44 -0500 | [diff] [blame] | 42 | volumeMounts: |
| 43 | - name: cni-bin |
| 44 | mountPath: /host/opt/cni/bin |
| 45 | containers: |
| 46 | - name: sriov-device-plugin |
| 47 | image: {{ .Values.images.tags.sriovDp }} |
| 48 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 49 | command: [ "/bin/sh", "-c", "--" ] |
| 50 | args: [ "sriovdp --logtostderr 10;" ] |
| 51 | securityContext: |
| 52 | privileged: true |
| 53 | volumeMounts: |
| 54 | - mountPath: /var/lib/kubelet/ |
| 55 | name: devicesock |
| 56 | readOnly: false |
| 57 | - mountPath: /sys |
| 58 | name: net |
| 59 | readOnly: true |
| 60 | - name: sriov-config |
| 61 | mountPath: /etc/pcidp |
| 62 | volumes: |
| 63 | - name: devicesock |
| 64 | hostPath: |
| 65 | path: /var/lib/kubelet/ |
| 66 | - name: net |
| 67 | hostPath: |
| 68 | path: /sys |
| 69 | - name: sriov-config |
| 70 | configMap: |
| 71 | name: sriov-config |
| 72 | - name: cni-bin |
| 73 | hostPath: |
| 74 | path: /opt/cni/bin |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 75 | {{- end }} |