Skip to content

Commit

Permalink
Fix pod egress rule cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
coufalja committed Jul 28, 2020
1 parent d66a3bb commit 8d424ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controllers/routing/pod_egress.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func (nrc *NetworkRoutingController) deletePodEgressRule() error {
if nrc.isIpv6 {
podEgressArgs = podEgressArgs6
}
if iptablesCmdHandler.HasRandomFully() {
podEgressArgs = append(podEgressArgs, "--random-fully")
}

exists, err := iptablesCmdHandler.Exists("nat", "POSTROUTING", podEgressArgs...)
if err != nil {
return errors.New("Failed to lookup iptables rule to masquerade outbound traffic from pods: " + err.Error())
Expand Down

0 comments on commit 8d424ea

Please sign in to comment.