Skip to content

Commit

Permalink
ignore pod not scheduled when reconcile subnet (#1666)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Jul 5, 2022
1 parent a158f8d commit eddce75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,10 @@ func (c *Controller) reconcileOvnRoute(subnet *kubeovnv1.Subnet) error {
if pod.Annotations[util.NorthGatewayAnnotation] != "" {
continue
}
// Pod will add to port-group when pod get updated
if pod.Spec.NodeName == "" {
continue
}

pgName := getOverlaySubnetsPortGroupName(subnet.Name, pod.Spec.NodeName)
c.ovnPgKeyMutex.Lock(pgName)
Expand Down

0 comments on commit eddce75

Please sign in to comment.