mirror of https://github.com/k3s-io/k3s
Merge pull request #75343 from Huang-Wei/scheduler-cleanup
scheduler: cleanup unused parameters in unschedulableQk3s-v1.15.3
commit
9feb23e5f5
|
@ -297,7 +297,7 @@ func NewPriorityQueueWithClock(stop <-chan struct{}, clock util.Clock) *Priority
|
|||
stop: stop,
|
||||
podBackoff: util.CreatePodBackoffWithClock(1*time.Second, 10*time.Second, clock),
|
||||
activeQ: util.NewHeap(podInfoKeyFunc, activeQComp),
|
||||
unschedulableQ: newUnschedulablePodsMap(clock),
|
||||
unschedulableQ: newUnschedulablePodsMap(),
|
||||
nominatedPods: newNominatedPodMap(),
|
||||
moveRequestCycle: -1,
|
||||
}
|
||||
|
@ -818,7 +818,7 @@ func (u *UnschedulablePodsMap) clear() {
|
|||
}
|
||||
|
||||
// newUnschedulablePodsMap initializes a new object of UnschedulablePodsMap.
|
||||
func newUnschedulablePodsMap(clock util.Clock) *UnschedulablePodsMap {
|
||||
func newUnschedulablePodsMap() *UnschedulablePodsMap {
|
||||
return &UnschedulablePodsMap{
|
||||
podInfoMap: make(map[string]*podInfo),
|
||||
keyFunc: util.GetPodFullName,
|
||||
|
|
|
@ -647,7 +647,7 @@ func TestUnschedulablePodsMap(t *testing.T) {
|
|||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
upm := newUnschedulablePodsMap(nil)
|
||||
upm := newUnschedulablePodsMap()
|
||||
for _, p := range test.podsToAdd {
|
||||
upm.addOrUpdate(newPodInfoNoTimestamp(p))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue