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 bf12ea0 commit 6aa6b0a
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 @@ -527,7 +527,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 @@ -811,7 +811,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 6aa6b0a

Please sign in to comment.