Merge pull request #80448 from tedyu/node-info-key

Check error return from GetPodKey
This commit is contained in:
Kubernetes Prow Robot 2019-07-26 20:16:23 -07:00 committed by GitHub
commit bc8ca12c87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -712,7 +712,10 @@ func (n *NodeInfo) FilterOutPods(pods []*v1.Pod) []*v1.Pod {
continue
}
// If pod is on the given node, add it to 'filtered' only if it is present in nodeInfo.
podKey, _ := GetPodKey(p)
podKey, err := GetPodKey(p)
if err != nil {
continue
}
for _, np := range n.Pods() {
npodkey, _ := GetPodKey(np)
if npodkey == podKey {