avoid re-allocating ServerRunOptions (#5108)

This commit is contained in:
ruijzhan
2022-08-01 12:04:56 +08:00
committed by GitHub
parent 965dbb5ca7
commit d87d7d2428

View File

@@ -41,10 +41,7 @@ func NewAPIServerCommand() *cobra.Command {
// Load configuration from file
conf, err := apiserverconfig.TryLoadFromDisk()
if err == nil {
s = &options.ServerRunOptions{
GenericServerRunOptions: s.GenericServerRunOptions,
Config: conf,
}
s.Config = conf
} else {
klog.Fatal("Failed to load configuration from disk", err)
}