Skip to content

Commit 2177218

Browse files
committed
fix typo: data-config.yaml -> device-config.yaml
Signed-off-by: SataQiu <shidaqiu2018@gmail.com>
1 parent 44e38a7 commit 2177218

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/plugin/vgpu/util/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const (
5353

5454
// DeviceName used to indicate this device
5555
VGPUDeviceName = "hamivgpu"
56+
57+
// DeviceConfigurationConfigMapKey specifies in what ConfigMap key the device configuration should be stored
58+
DeviceConfigurationConfigMapKey = "device-config.yaml"
5659
)
5760

5861
var (

pkg/plugin/vgpu/util/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ func LoadConfigFromCM(cmName string) (*config.Config, error) {
349349
return nil, err
350350
}
351351
}
352-
data, ok := cm.Data["device-config.yaml"]
352+
data, ok := cm.Data[DeviceConfigurationConfigMapKey]
353353
if !ok {
354-
return nil, errors.New("data-config.yaml not found")
354+
return nil, fmt.Errorf("%v not found in ConfigMap %v", DeviceConfigurationConfigMapKey, cmName)
355355
}
356356
var yamlData config.Config
357357
err = yaml.Unmarshal([]byte(data), &yamlData)

0 commit comments

Comments
 (0)