Skip to content

Commit

Permalink
Remove ofPorts from lastRealized.podOFPorts after deleting an OF rule (
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjuns authored Jul 9, 2020
1 parent b3ca03e commit 5cdf488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/agent/controller/networkpolicy/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ func (r *reconciler) update(lastRealized *lastRealized, newRule *CompletedRule,
return err
}
delete(lastRealized.ofIDs, svcHash)
delete(lastRealized.podOFPorts, svcHash)
}
lastRealized.CompletedRule = newRule
return nil
Expand Down Expand Up @@ -508,6 +509,7 @@ func (r *reconciler) Forget(ruleID string) error {
return err
}
delete(lastRealized.ofIDs, svcHash)
delete(lastRealized.podOFPorts, svcHash)
}

r.lastRealizeds.Delete(ruleID)
Expand Down

0 comments on commit 5cdf488

Please sign in to comment.