mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #80448 from tedyu/node-info-key
Check error return from GetPodKey
This commit is contained in:
commit
bc8ca12c87
@ -712,7 +712,10 @@ func (n *NodeInfo) FilterOutPods(pods []*v1.Pod) []*v1.Pod {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// If pod is on the given node, add it to 'filtered' only if it is present in nodeInfo.
|
// 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() {
|
for _, np := range n.Pods() {
|
||||||
npodkey, _ := GetPodKey(np)
|
npodkey, _ := GetPodKey(np)
|
||||||
if npodkey == podKey {
|
if npodkey == podKey {
|
||||||
|
Loading…
Reference in New Issue
Block a user