code: func (o *DeprecatedOptions) ApplyTo(cfg *kubeschedulerconfig.KubeSchedulerConfiguration) error {
  	if o == nil {
  		return nil
  	}
  
  	switch {
  	case o.UseLegacyPolicyConfig || (len(o.PolicyConfigFile) > 0 && o.PolicyConfigMapName == ""):
  		cfg.AlgorithmSource = kubeschedulerconfig.SchedulerAlgorithmSource{
  			Policy: &kubeschedulerconfig.SchedulerPolicySource{
  				File: &kubeschedulerconfig.SchedulerPolicyFileSource{
  					Path: o.PolicyConfigFile,
  				},
  			},
  		}
  	case len(o.PolicyConfigMapName) > 0:
  		cfg.AlgorithmSource = kubeschedulerconfig.SchedulerAlgorithmSource{
  			Policy: &kubeschedulerconfig.SchedulerPolicySource{
  				ConfigMap: &kubeschedulerconfig.SchedulerPolicyConfigMapSource{
  					Name:      o.PolicyConfigMapName,
  					Namespace: o.PolicyConfigMapNamespace,
  				},
  			},
  		}
  	case len(o.AlgorithmProvider) > 0:
  		cfg.AlgorithmSource = kubeschedulerconfig.SchedulerAlgorithmSource{
  			Provider: &o.AlgorithmProvider,
  		}
  	}
  
  	return nil
  }
docs: // ApplyTo sets cfg.AlgorithmSource from flags passed on the command line in the following precedence order:
  //
  // 1. --use-legacy-policy-config to use a policy file.
  // 2. --policy-configmap to use a policy config map value.
  // 3. --algorithm-provider to use a named algorithm provider.