mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
commit
7bcdbc5a51
@ -114,7 +114,7 @@ func NewHTTPExtender(config *schedulerapi.ExtenderConfig) (algorithm.SchedulerEx
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name returns extenderURL to identifies the extender.
|
// Name returns extenderURL to identify the extender.
|
||||||
func (h *HTTPExtender) Name() string {
|
func (h *HTTPExtender) Name() string {
|
||||||
return h.extenderURL
|
return h.extenderURL
|
||||||
}
|
}
|
||||||
@ -125,8 +125,8 @@ func (h *HTTPExtender) IsIgnorable() bool {
|
|||||||
return h.ignorable
|
return h.ignorable
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupportsPreemption returns if a extender support preemption.
|
// SupportsPreemption returns true if an extender supports preemption.
|
||||||
// A extender should have preempt verb defined and enabled its own node cache.
|
// An extender should have preempt verb defined and enabled its own node cache.
|
||||||
func (h *HTTPExtender) SupportsPreemption() bool {
|
func (h *HTTPExtender) SupportsPreemption() bool {
|
||||||
return len(h.preemptVerb) > 0
|
return len(h.preemptVerb) > 0
|
||||||
}
|
}
|
||||||
|
@ -706,7 +706,7 @@ func MakeDefaultErrorFunc(client clientset.Interface, backoff *util.PodBackoff,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// nodeEnumerator allows a cache.Poller to enumerate items in an v1.NodeList
|
// nodeEnumerator allows a cache.Poller to enumerate items in a v1.NodeList
|
||||||
type nodeEnumerator struct {
|
type nodeEnumerator struct {
|
||||||
*v1.NodeList
|
*v1.NodeList
|
||||||
}
|
}
|
||||||
|
2
pkg/scheduler/internal/cache/cache_test.go
vendored
2
pkg/scheduler/internal/cache/cache_test.go
vendored
@ -879,7 +879,7 @@ func TestForgetPod(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getResourceRequest returns the resource request of all containers in Pods;
|
// getResourceRequest returns the resource request of all containers in Pods;
|
||||||
// excuding initContainers.
|
// excluding initContainers.
|
||||||
func getResourceRequest(pod *v1.Pod) v1.ResourceList {
|
func getResourceRequest(pod *v1.Pod) v1.ResourceList {
|
||||||
result := &schedulernodeinfo.Resource{}
|
result := &schedulernodeinfo.Resource{}
|
||||||
for _, container := range pod.Spec.Containers {
|
for _, container := range pod.Spec.Containers {
|
||||||
|
Loading…
Reference in New Issue
Block a user