Skip to content

Commit

Permalink
fix adding key to delete Pod queue
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Apr 7, 2022
1 parent 0ea24dc commit 03af744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func (c *Controller) handleAddPod(key string) error {
if k8serrors.IsNotFound(err) {
// Sometimes pod is deleted between kube-ovn configure ovn-nb and patch pod.
// Then we need to recycle the resource again.
c.deletePodQueue.AddRateLimited(key)
c.deletePodQueue.AddRateLimited(pod)
return nil
}
klog.Errorf("patch pod %s/%s failed: %v", name, namespace, err)
Expand Down Expand Up @@ -907,7 +907,7 @@ func (c *Controller) handleUpdatePod(key string) error {
if k8serrors.IsNotFound(err) {
// Sometimes pod is deleted between kube-ovn configure ovn-nb and patch pod.
// Then we need to recycle the resource again.
c.deletePodQueue.AddRateLimited(key)
c.deletePodQueue.AddRateLimited(pod)
return nil
}
klog.Errorf("patch pod %s/%s failed %v", name, namespace, err)
Expand Down

0 comments on commit 03af744

Please sign in to comment.