Merge pull request #79531 from odinuge/kubelet-dead-code

Remove unnecessary variable declaration
This commit is contained in:
Kubernetes Prow Robot 2019-07-08 14:28:01 -07:00 committed by GitHub
commit 858fce1634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -221,7 +221,6 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I
}
}
var capacity = v1.ResourceList{}
var internalCapacity = v1.ResourceList{}
// It is safe to invoke `MachineInfo` on cAdvisor before logically initializing cAdvisor here because
// machine info is computed and cached once as part of cAdvisor object creation.
@ -230,7 +229,7 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I
if err != nil {
return nil, err
}
capacity = cadvisor.CapacityFromMachineInfo(machineInfo)
capacity := cadvisor.CapacityFromMachineInfo(machineInfo)
for k, v := range capacity {
internalCapacity[k] = v
}