mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-11 01:41:54 -04:00
Fix possible panic in PodAffinityChecker
This commit is contained in:
parent
87b40782c9
commit
f758cb418d
1 changed files with 1 additions and 1 deletions
|
|
@ -968,7 +968,7 @@ func (c *PodAffinityChecker) getMatchingAntiAffinityTerms(pod *api.Pod, allPods
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if affinity.PodAntiAffinity != nil {
|
||||
if affinity != nil && affinity.PodAntiAffinity != nil {
|
||||
existingPodNode, err := c.info.GetNodeInfo(existingPod.Spec.NodeName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in a new issue