From d461b22c961aa4834877296f6cae590fe3176426 Mon Sep 17 00:00:00 2001 From: "rongfu.leng" Date: Sat, 14 Sep 2024 11:19:38 +0800 Subject: [PATCH] cleanup device-plugin configmap Signed-off-by: rongfu.leng --- .../templates/device-plugin/configmap.yaml | 8 ----- docs/device-plugin-config.md | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 docs/device-plugin-config.md diff --git a/charts/hami/templates/device-plugin/configmap.yaml b/charts/hami/templates/device-plugin/configmap.yaml index 6d9055b71..00184c593 100644 --- a/charts/hami/templates/device-plugin/configmap.yaml +++ b/charts/hami/templates/device-plugin/configmap.yaml @@ -10,14 +10,6 @@ data: { "nodeconfig": [ { - "name": "m5-cloudinfra-online02", - "devicememoryscaling": 1.8, - "devicesplitcount": 10, - "migstrategy":"none", - "filterdevices": { - "uuid": [], - "index": [] - } } ] } \ No newline at end of file diff --git a/docs/device-plugin-config.md b/docs/device-plugin-config.md new file mode 100644 index 000000000..6f65f862b --- /dev/null +++ b/docs/device-plugin-config.md @@ -0,0 +1,33 @@ +# Config Device-Plugin + +We provide a configuration file for the device-plugin, The configuration is a configmap. + +The configuration file is a json file, and the following is an example of the configuration file: +ddd +```json + { + "nodeconfig": [ + { + "name": "m5-cloudinfra-online02", + "devicememoryscaling": 1.8, + "devicesplitcount": 10, + "migstrategy":"none", + "filterdevices": { + "uuid": [], + "index": [] + } + } + ] + } +``` + +- `name`: The name of the node. +- `devicememoryscaling`: The memory scaling factor for the device of the node. The memory scaling factor is used to calculate the memory size of the device. The memory size of the device is calculated by the following formula: `memory size = memory scaling factor * device memory size`. +- `devicesplitcount`: The number of device instances that the device is split into of the node. The device instances are used to create the device resources in the device-plugin. +- `migstrategy`: The MIG strategy for the device instances. The MIG strategy can be one of the following values: + - `none`: The device is disabled for MIG. + - `single`: The device is enabled for MIG with a single instance. + - `mixed`: The device is enabled for MIG with multiple instances. +- `filterdevices`: The filter devices for the device instances. The filter devices can be one of the following values: + - `uuid`: The UUID of the device. + - `index`: The index of the device. \ No newline at end of file