Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add env var to disable tunnel in calico node #9443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions node/filesystem/etc/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ fi
NODENAME=$(cat /var/lib/calico/nodename)
export NODENAME

# If possible pre-allocate any tunnel addresses.
calico-node -allocate-tunnel-addrs -allocate-tunnel-addrs-run-once || exit 1
if [ -z "$CALICO_DISABLE_TUNNEL" ]; then
# If possible pre-allocate any tunnel addresses.
calico-node -allocate-tunnel-addrs -allocate-tunnel-addrs-run-once || exit 1
fi


# Create a directly to put enabled service files
mkdir /etc/service/enabled
Expand All @@ -41,8 +44,12 @@ if [ "$CALICO_NETWORKING_BACKEND" != "none" ]; then
cp -a /etc/service/available/monitor-addresses /etc/service/enabled/
fi

# Enable the allocate tunnel IP service
cp -a /etc/service/available/allocate-tunnel-addrs /etc/service/enabled/
# Allow tunnel to be disabled,for example, when only calico bgp mode is used
if [ -z "$CALICO_DISABLE_TUNNEL" ]; then
# Enable the allocate tunnel IP service
cp -a /etc/service/available/allocate-tunnel-addrs /etc/service/enabled/
fi


# Enable the node status reporter service
cp -a /etc/service/available/node-status-reporter /etc/service/enabled/
Expand Down