mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
Use scheduler cache in affinity priority functions
Make the cache implement NodeLister and expose it to the priority functions. This way, the priority functions make use of a single cache, the scheduler's, instead of mixing it with the lister's caches. Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
@@ -33,9 +33,9 @@ var _ algorithm.NodeLister = &FakeNodeLister{}
|
||||
// FakeNodeLister implements NodeLister on a []string for test purposes.
|
||||
type FakeNodeLister []*v1.Node
|
||||
|
||||
// List returns nodes as a []string.
|
||||
func (f FakeNodeLister) List() ([]*v1.Node, error) {
|
||||
return f, nil
|
||||
// ListNodes returns nodes as a []*v1.Node.
|
||||
func (f FakeNodeLister) ListNodes() []*v1.Node {
|
||||
return f
|
||||
}
|
||||
|
||||
var _ algorithm.PodLister = &FakePodLister{}
|
||||
|
Reference in New Issue
Block a user