mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
e2e scheduling priorities: do not reference control loop variable
Otherwise, nodeNameToPodList[nodeName] list will have all its references identical (corresponding to the control variable reference). Thus, making all the pods in the list identical.
This commit is contained in:
parent
9462ca2312
commit
b3249a1b39
@ -485,9 +485,9 @@ func podListForEachNode(cs clientset.Interface) map[string][]*v1.Pod {
|
||||
if err != nil {
|
||||
framework.Failf("Expect error of invalid, got : %v", err)
|
||||
}
|
||||
for _, pod := range allPods.Items {
|
||||
for i, pod := range allPods.Items {
|
||||
nodeName := pod.Spec.NodeName
|
||||
nodeNameToPodList[nodeName] = append(nodeNameToPodList[nodeName], &pod)
|
||||
nodeNameToPodList[nodeName] = append(nodeNameToPodList[nodeName], &allPods.Items[i])
|
||||
}
|
||||
return nodeNameToPodList
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user