Skip to content

Commit

Permalink
Compatible with controller deployment methods before kube-ovn 1.11.16 (
Browse files Browse the repository at this point in the history
…#3677)

Signed-off-by: Changlu Yi <clyi@alauda.io>
  • Loading branch information
changluyi committed Jan 31, 2024
1 parent ea91898 commit 6d1cbd3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dist/images/start-ic-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,18 @@ if [[ $ENABLE_OVN_LEADER_CHECK == "true" ]]; then
chmod 600 /etc/ovn/*
/kube-ovn/kube-ovn-leader-checker --probeInterval=${OVN_LEADER_PROBE_INTERVAL} --isICDBServer=true
else

# Compatible with controller deployment methods before kube-ovn 1.11.16
TS_NAME=${TS_NAME:-ts}
PROTOCOL=${PROTOCOL:-ipv4}
if [ "$PROTOCOL" = "ipv4" ]; then
TS_CIDR=${TS_CIDR:-169.254.100.0/24}
elif [ "$PROTOCOL" = "ipv6" ]; then
TS_CIDR=${TS_CIDR:-fe80:a9fe:64::/112}
elif [ "$PROTOCOL" = "dual" ]; then
TS_CIDR=${TS_CIDR:-"169.254.100.0/24,fe80:a9fe:64::/112"}
fi
ovn-ic-nbctl --may-exist ts-add "$TS_NAME"
ovn-ic-nbctl set Transit_Switch ts external_ids:subnet="$TS_CIDR"
tail --follow=name --retry /var/log/ovn/ovsdb-server-ic-nb.log
fi

0 comments on commit 6d1cbd3

Please sign in to comment.