feat: use schedulerapi.MaxPriority instead of hard-coded int

This commit is contained in:
draveness 2019-08-14 15:58:08 +08:00
parent 9fb0df5096
commit d3cc73965a
2 changed files with 3 additions and 1 deletions

View File

@ -12,6 +12,7 @@ go_library(
importpath = "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/scheduler/api:go_default_library",
"//pkg/scheduler/apis/config:go_default_library",
"//pkg/scheduler/internal/cache:go_default_library",
"//pkg/scheduler/util:go_default_library",

View File

@ -24,6 +24,7 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
schedulerapi "k8s.io/kubernetes/pkg/scheduler/api"
internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache"
)
@ -63,7 +64,7 @@ const (
const (
// MaxNodeScore is the maximum score a Score plugin is expected to return.
MaxNodeScore int = 10
MaxNodeScore int = schedulerapi.MaxPriority
// MinNodeScore is the minimum score a Score plugin is expected to return.
MinNodeScore int = 0