File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
cmd/metrics-server/app/options Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -138,8 +138,16 @@ func (o Options) ApiserverConfig() (*genericapiserver.Config, error) {
138138 return nil , fmt .Errorf ("error creating self-signed certificates: %v" , err )
139139 }
140140
141- serverConfig := genericapiserver .NewConfig (api .Codecs )
141+ // Calling Set() here silences the componentGlobalsRegistry.SetFallback
142+ // warning log mentioned in issue #1658. In the case of metrics-server, it
143+ // doesn't expose feature-gates so the warning is not applicable, but if we
144+ // were to add some in the future, the call to Set() is close to where flags
145+ // are parsed.
146+ if err := o .GenericServerRunOptions .ComponentGlobalsRegistry .Set (); err != nil {
147+ return nil , err
148+ }
142149
150+ serverConfig := genericapiserver .NewConfig (api .Codecs )
143151 if err := o .GenericServerRunOptions .ApplyTo (serverConfig ); err != nil {
144152 return nil , err
145153 }
You can’t perform that action at this time.
0 commit comments