Skip to content

Commit

Permalink
Merge pull request #50 from SataQiu/fix-typo-20250223
Browse files Browse the repository at this point in the history
fix typo: data-config.yaml -> device-config.yaml
  • Loading branch information
archlitchi authored Feb 25, 2025
2 parents 44e38a7 + 2177218 commit 817e68b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/plugin/vgpu/util/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const (

// DeviceName used to indicate this device
VGPUDeviceName = "hamivgpu"

// DeviceConfigurationConfigMapKey specifies in what ConfigMap key the device configuration should be stored
DeviceConfigurationConfigMapKey = "device-config.yaml"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/plugin/vgpu/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ func LoadConfigFromCM(cmName string) (*config.Config, error) {
return nil, err
}
}
data, ok := cm.Data["device-config.yaml"]
data, ok := cm.Data[DeviceConfigurationConfigMapKey]
if !ok {
return nil, errors.New("data-config.yaml not found")
return nil, fmt.Errorf("%v not found in ConfigMap %v", DeviceConfigurationConfigMapKey, cmName)
}
var yamlData config.Config
err = yaml.Unmarshal([]byte(data), &yamlData)
Expand Down

0 comments on commit 817e68b

Please sign in to comment.