mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #30585 from m1093782566/remotve-duplicated-assignment
Automatic merge from submit-queue remove duplicated nodeinfo.pods assignment There are duplicated assignments for nodeinfo.pods, one place is [here](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/schedulercache/node_info.go#L139) and the other one is [here](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/schedulercache/node_info.go#L147). I think we can remove one. The related issue is #30610
This commit is contained in:
commit
214c916045
@ -133,10 +133,8 @@ func (n *NodeInfo) AllocatableResource() Resource {
|
||||
}
|
||||
|
||||
func (n *NodeInfo) Clone() *NodeInfo {
|
||||
pods := append([]*api.Pod(nil), n.pods...)
|
||||
clone := &NodeInfo{
|
||||
node: n.node,
|
||||
pods: pods,
|
||||
requestedResource: &(*n.requestedResource),
|
||||
nonzeroRequest: &(*n.nonzeroRequest),
|
||||
allocatableResource: &(*n.allocatableResource),
|
||||
|
Loading…
Reference in New Issue
Block a user