mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
feat: use schedulerapi.MaxPriority instead of hard-coded int
This commit is contained in:
parent
9fb0df5096
commit
d3cc73965a
@ -12,6 +12,7 @@ go_library(
|
|||||||
importpath = "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1",
|
importpath = "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
"//pkg/scheduler/api:go_default_library",
|
||||||
"//pkg/scheduler/apis/config:go_default_library",
|
"//pkg/scheduler/apis/config:go_default_library",
|
||||||
"//pkg/scheduler/internal/cache:go_default_library",
|
"//pkg/scheduler/internal/cache:go_default_library",
|
||||||
"//pkg/scheduler/util:go_default_library",
|
"//pkg/scheduler/util:go_default_library",
|
||||||
|
@ -24,6 +24,7 @@ import (
|
|||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
schedulerapi "k8s.io/kubernetes/pkg/scheduler/api"
|
||||||
internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache"
|
internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ const (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// MaxNodeScore is the maximum score a Score plugin is expected to return.
|
// 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 is the minimum score a Score plugin is expected to return.
|
||||||
MinNodeScore int = 0
|
MinNodeScore int = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user