Skip to content

Commit

Permalink
Update install script to clean iptables rules before start
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Bonafiglia <[email protected]>
  • Loading branch information
rbrtbnfgl committed Apr 12, 2023
1 parent e0cd834 commit d8a23e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,15 @@ service_enable_and_start() {
return
fi
if command -v iptables-save &> /dev/null && command -v iptables-restore &> /dev/null
then
$SUDO iptables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO iptables-restore
fi
if command -v ip6tables-save &> /dev/null && command -v ip6tables-restore &> /dev/null
then
$SUDO ip6tables-save | grep -v KUBE- | grep -v CNI- | grep -iv flannel | $SUDO ip6tables-restore
fi
[ "${HAS_SYSTEMD}" = true ] && systemd_start
[ "${HAS_OPENRC}" = true ] && openrc_start
return 0
Expand Down

0 comments on commit d8a23e4

Please sign in to comment.