Skip to content

Commit

Permalink
when we delete the pod,it's no need to update the sgs assign to pod (#…
Browse files Browse the repository at this point in the history
…2465)

Co-authored-by: yuanliu <yuanliu@cmss.chinamobile.com>
  • Loading branch information
lynn901 and yuanliu committed Mar 13, 2023
1 parent 3fd564b commit 5b07ccb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/controller/pod.go
Expand Up @@ -779,19 +779,12 @@ func (c *Controller) handleDeletePod(pod *v1.Pod) error {
}

for _, port := range ports {
sgs, err := c.getPortSg(&port)
if err != nil {
klog.Warningf("failed to get port '%s' sg, %v", port.Name, err)
}
// when lsp is deleted, the port of pod is deleted from any port-group automatically.
klog.Infof("gc logical switch port %s", port.Name)
if err := c.ovnLegacyClient.DeleteLogicalSwitchPort(port.Name); err != nil {
klog.Errorf("failed to delete lsp %s, %v", port.Name, err)
return err
}
for _, sg := range sgs {
c.syncSgPortsQueue.Add(sg)
}
}
podNets, err := c.getPodKubeovnNets(pod)
if err != nil {
Expand Down

0 comments on commit 5b07ccb

Please sign in to comment.