Unverified Commit f611b322 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #59386 from ravisantoshgudimetla/fix-scheduler-config-file

Automatic merge from submit-queue (batch tested with PRs 59165, 59386). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Scheduler - not able to read from config file if configmap is not found **What this PR does / why we need it**: As of now, we are not able to read config file if configmap is not present. As of now, the only way to make it work is to enable legacy mode which should not be the case. xref: https://bugzilla.redhat.com/show_bug.cgi?id=1540785 **Release note**: ```release-note Scheduler should be able to read from config file if configmap is not present. ``` /cc @bsalamat @ironcladlou
parents db23481c 34d35f13
...@@ -214,7 +214,7 @@ func (o *Options) applyDeprecatedHealthzPortToConfig() { ...@@ -214,7 +214,7 @@ func (o *Options) applyDeprecatedHealthzPortToConfig() {
// 3. --algorithm-provider to use a named algorithm provider. // 3. --algorithm-provider to use a named algorithm provider.
func (o *Options) applyDeprecatedAlgorithmSourceOptionsToConfig() { func (o *Options) applyDeprecatedAlgorithmSourceOptionsToConfig() {
switch { switch {
case o.useLegacyPolicyConfig: case o.useLegacyPolicyConfig || (len(o.policyConfigFile) > 0 && o.policyConfigMapName == ""):
o.config.AlgorithmSource = componentconfig.SchedulerAlgorithmSource{ o.config.AlgorithmSource = componentconfig.SchedulerAlgorithmSource{
Policy: &componentconfig.SchedulerPolicySource{ Policy: &componentconfig.SchedulerPolicySource{
File: &componentconfig.SchedulerPolicyFileSource{ File: &componentconfig.SchedulerPolicyFileSource{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment