mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Cleanup generic_scheduler
This commit is contained in:
parent
1dddcea2f0
commit
0e989afa66
@ -103,12 +103,12 @@ func getMinHosts(list HostPriorityList) []string {
|
|||||||
// EqualPriority is a prioritizer function that gives an equal weight of one to all nodes
|
// EqualPriority is a prioritizer function that gives an equal weight of one to all nodes
|
||||||
func EqualPriority(pod api.Pod, podLister PodLister, minionLister MinionLister) (HostPriorityList, error) {
|
func EqualPriority(pod api.Pod, podLister PodLister, minionLister MinionLister) (HostPriorityList, error) {
|
||||||
nodes, err := minionLister.List()
|
nodes, err := minionLister.List()
|
||||||
result := []HostPriority{}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("failed to list nodes: %v", err)
|
fmt.Errorf("failed to list nodes: %v", err)
|
||||||
return []HostPriority{}, err
|
return []HostPriority{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
result := []HostPriority{}
|
||||||
for _, minion := range nodes.Items {
|
for _, minion := range nodes.Items {
|
||||||
result = append(result, HostPriority{
|
result = append(result, HostPriority{
|
||||||
host: minion.Name,
|
host: minion.Name,
|
||||||
|
Loading…
Reference in New Issue
Block a user