code: func (o *Options) ApplyTo(c *schedulerappconfig.Config) error {
  	if len(o.ConfigFile) == 0 {
  		c.ComponentConfig = o.ComponentConfig
  
  		// only apply deprecated flags if no config file is loaded (this is the old behaviour).
  		if err := o.Deprecated.ApplyTo(&c.ComponentConfig); err != nil {
  			return err
  		}
  		if err := o.CombinedInsecureServing.ApplyTo(c, &c.ComponentConfig); err != nil {
  			return err
  		}
  	} else {
  		cfg, err := loadConfigFromFile(o.ConfigFile)
  		if err != nil {
  			return err
  		}
  
  		// use the loaded config file only, with the exception of --address and --port. This means that
  		// none of the deprecated flags in o.Deprecated are taken into consideration. This is the old
  		// behaviour of the flags we have to keep.
  		c.ComponentConfig = *cfg
  
  		if err := o.CombinedInsecureServing.ApplyToFromLoadedConfig(c, &c.ComponentConfig); err != nil {
  			return err
  		}
  	}
  
  	if err := o.SecureServing.ApplyTo(&c.SecureServing, &c.LoopbackClientConfig); err != nil {
  		return err
  	}
  	if o.SecureServing != nil && (o.SecureServing.BindPort != 0 || o.SecureServing.Listener != nil) {
  		if err := o.Authentication.ApplyTo(&c.Authentication, c.SecureServing, nil); err != nil {
  			return err
  		}
  		if err := o.Authorization.ApplyTo(&c.Authorization); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // ApplyTo applies the scheduler options to the given scheduler app configuration.