@@ -22,6 +22,7 @@ import (
2222 "os"
2323
2424 cli "github.com/urfave/cli/v2"
25+ "k8s.io/klog/v2"
2526
2627 "sigs.k8s.io/yaml"
2728)
@@ -79,26 +80,20 @@ func NewConfig(c *cli.Context, flags []cli.Flag) (*Config, error) {
7980 return config , nil
8081}
8182
82- // logger is used to issue warning in API functions without requiring an explicit implementation.
83- type logger interface {
84- Warning (... interface {})
85- Warningf (string , ... interface {})
86- }
87-
8883// DisableResourceNamingInConfig temporarily disable the resource renaming feature of the plugin.
8984// This may be reenabled in a future release.
90- func DisableResourceNamingInConfig (logger logger , config * Config ) {
85+ func DisableResourceNamingInConfig (config * Config ) {
9186 // Disable resource renaming through config.Resource
9287 if len (config .Resources .GPUs ) > 0 || len (config .Resources .MIGs ) > 0 {
93- logger .Warning ("Customizing the 'resources' field is not yet supported in the config. Ignoring..." )
88+ klog .Warning ("Customizing the 'resources' field is not yet supported in the config. Ignoring..." )
9489 }
9590 config .Resources .GPUs = nil
9691 config .Resources .MIGs = nil
9792
9893 // Disable renaming / device selection in Sharing.TimeSlicing.Resources
99- config .Sharing .TimeSlicing .disableResoureRenaming (logger , "timeSlicing" )
94+ config .Sharing .TimeSlicing .disableResoureRenaming ("timeSlicing" )
10095 // Disable renaming / device selection in Sharing.MPS.Resources
101- config .Sharing .MPS .disableResoureRenaming (logger , "mps" )
96+ config .Sharing .MPS .disableResoureRenaming ("mps" )
10297}
10398
10499// parseConfig parses a config file as either YAML of JSON and unmarshals it into a Config struct.
0 commit comments