Skip to content

Commit

Permalink
Merge pull request ovn-kubernetes#2570 from dceara/fix-cni-pod-cache
Browse files Browse the repository at this point in the history
cni: Use POD from cache, if available.
  • Loading branch information
dcbw authored Oct 13, 2021
2 parents 25fb1c8 + 226a49b commit ac5ce1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go-controller/pkg/cni/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func getPod(podLister corev1listers.PodLister, kclient kubernetes.Interface, nam
// drop through
}

if kclient != nil {
if pod == nil && kclient != nil {
// If the pod wasn't in our local cache, ask for it directly
pod, err = kclient.CoreV1().Pods(namespace).Get(context.TODO(), name, metav1.GetOptions{})
}
Expand Down

0 comments on commit ac5ce1c

Please sign in to comment.