Skip to content

Commit

Permalink
feat: set kernel args when start cniserver
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed May 31, 2019
1 parent f79e573 commit 8984c90
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dist/images/start-cniserver.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail

if [[ -f "/proc/sys/net/bridge/bridge-nf-call-iptables" ]];
then echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables;
fi

if [[ -f "/proc/sys/net/ipv4/ip_forward" ]];
then echo 1 > /proc/sys/net/ipv4/ip_forward;
fi

if [[ -f "/proc/sys/net/ipv4/conf/all/rp_filter" ]];
then echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter;
fi

SOCK=/run/openvswitch/kube-ovn-daemon.sock

if [[ -e "$SOCK" ]]
Expand Down

0 comments on commit 8984c90

Please sign in to comment.