Hyunsun Moon | 0e39f27 | 2020-09-10 15:38:04 -0700 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # Copyright 2018 Intel Corporation |
| 4 | |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 7 | */}} |
| 8 | |
| 9 | --- |
| 10 | kind: ConfigMap |
| 11 | apiVersion: v1 |
| 12 | metadata: |
| 13 | name: sriov-config |
| 14 | data: |
| 15 | config.json: | |
| 16 | { |
| 17 | "resourceList": [ |
| 18 | { |
| 19 | "resourceName": "sriov_vfio_access_net", |
| 20 | "selectors": { |
Hyunsun Moon | 785d81b | 2020-11-06 05:56:21 +0000 | [diff] [blame] | 21 | {{- if hasKey .Values.config.sriov.resourceList.vfio "accessPciAddresses" }} |
| 22 | "pciAddresses": {{ toJson .Values.config.sriov.resourceList.vfio.accessPciAddresses }} |
| 23 | {{- else if hasKey .Values.config.sriov.resourceList.vfio "accessPfNames" }} |
Hyunsun Moon | 0e39f27 | 2020-09-10 15:38:04 -0700 | [diff] [blame] | 24 | "pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.accessPfNames }}, |
| 25 | "drivers": ["vfio-pci"] |
Hyunsun Moon | 785d81b | 2020-11-06 05:56:21 +0000 | [diff] [blame] | 26 | {{- end }} |
Hyunsun Moon | 0e39f27 | 2020-09-10 15:38:04 -0700 | [diff] [blame] | 27 | } |
| 28 | }, |
| 29 | { |
| 30 | "resourceName": "sriov_vfio_core_net", |
| 31 | "selectors": { |
Hyunsun Moon | 785d81b | 2020-11-06 05:56:21 +0000 | [diff] [blame] | 32 | {{- if hasKey .Values.config.sriov.resourceList.vfio "corePciAddresses" }} |
| 33 | "pciAddresses": {{ toJson .Values.config.sriov.resourceList.vfio.corePciAddresses }} |
| 34 | {{- else if hasKey .Values.config.sriov.resourceList.vfio "corePfNames" }} |
Hyunsun Moon | 0e39f27 | 2020-09-10 15:38:04 -0700 | [diff] [blame] | 35 | "pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.corePfNames }}, |
| 36 | "drivers": ["vfio-pci"] |
Hyunsun Moon | 785d81b | 2020-11-06 05:56:21 +0000 | [diff] [blame] | 37 | {{- end }} |
Hyunsun Moon | 0e39f27 | 2020-09-10 15:38:04 -0700 | [diff] [blame] | 38 | } |
| 39 | } |
| 40 | {{- if hasKey .Values.config.sriov.resourceList "netDevice" }} |
| 41 | , |
| 42 | { |
| 43 | "resourceName": "sriov_netdevice", |
| 44 | "selectors": { |
| 45 | "pfNames": {{ toJson .Values.config.sriov.resourceList.netDevice.pfNames }}, |
| 46 | "drivers": {{ toJson .Values.config.sriov.resourceList.netDevice.drivers }} |
| 47 | } |
| 48 | } |
| 49 | {{- end }} |
| 50 | ] |
| 51 | } |