Skip to content

Commit

Permalink
fix: when address is empty, skip route/nat deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Jan 7, 2021
1 parent db68b27 commit 0b4e445
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ func (c *Controller) handleDeletePod(key string) error {

addresses := c.ipam.GetPodAddress(key)
for _, address := range addresses {
if strings.TrimSpace(address.Ip) == "" {
continue
}
subnet, err := c.subnetsLister.Get(address.Subnet.Name)
if err != nil {
return err
Expand Down

0 comments on commit 0b4e445

Please sign in to comment.