blob: 72b9bd6172a173a0a5bc50ace355ebf3a06ab42b [file] [log] [blame]
Hyunsun Moon0e39f272020-09-10 15:38:04 -07001{{/*
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---
10kind: ConfigMap
11apiVersion: v1
12metadata:
13 name: sriov-config
14data:
15 config.json: |
16 {
17 "resourceList": [
18 {
19 "resourceName": "sriov_vfio_access_net",
20 "selectors": {
Hyunsun Moon785d81b2020-11-06 05:56:21 +000021{{- 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 Moon0e39f272020-09-10 15:38:04 -070024 "pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.accessPfNames }},
25 "drivers": ["vfio-pci"]
Hyunsun Moon785d81b2020-11-06 05:56:21 +000026{{- end }}
Hyunsun Moon0e39f272020-09-10 15:38:04 -070027 }
28 },
29 {
30 "resourceName": "sriov_vfio_core_net",
31 "selectors": {
Hyunsun Moon785d81b2020-11-06 05:56:21 +000032{{- 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 Moon0e39f272020-09-10 15:38:04 -070035 "pfNames": {{ toJson .Values.config.sriov.resourceList.vfio.corePfNames }},
36 "drivers": ["vfio-pci"]
Hyunsun Moon785d81b2020-11-06 05:56:21 +000037{{- end }}
Hyunsun Moon0e39f272020-09-10 15:38:04 -070038 }
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 }