Skip to content

Commit

Permalink
Cherry pick PR #196 on 1.26 (#203)
Browse files Browse the repository at this point in the history
* printed warning if priority configmap missing

* LEADER_ELECT env variable defaulted in makefile
  • Loading branch information
himanshu-kun authored Apr 5, 2023
1 parent 56b9847 commit 7b27959
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cluster-autoscaler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GOOS?=linux
GOARCH?=$(shell go env GOARCH)
REGISTRY?=staging-k8s.gcr.io
DOCKER_NETWORK?=default
LEADER_ELECT?=false
ifdef BUILD_TAGS
TAGS_FLAG=--tags ${BUILD_TAGS}
PROVIDER=-${BUILD_TAGS}
Expand Down
5 changes: 4 additions & 1 deletion cluster-autoscaler/expander/priority/priority.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ func NewFilter(configMapLister v1lister.ConfigMapNamespaceLister,
func (p *priority) reloadConfigMap() (priorities, *apiv1.ConfigMap, error) {
cm, err := p.configMapLister.Get(PriorityConfigMapName)
if err != nil {
return nil, nil, fmt.Errorf("Priority expander config map %s not found: %v", PriorityConfigMapName, err)
// FORK-CHANGE: logged warning to simplify debugging.
msg := fmt.Sprintf("Priority expander config map %q not found: %v", PriorityConfigMapName, err)
klog.Warning(msg)
return nil, nil, errors.New(msg)
}

prioString, found := cm.Data[ConfigMapKey]
Expand Down

0 comments on commit 7b27959

Please sign in to comment.