mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Check error return from GetPodKey
This commit is contained in:
parent
7e6b70fbb5
commit
47ccb69907
@ -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