From 88dca5643895956afe10e9e40b135b400472e9e0 Mon Sep 17 00:00:00 2001 From: wizard Date: Fri, 27 Mar 2015 15:13:43 +0800 Subject: [PATCH] fix bug in single ubuntu node configuration --- cluster/ubuntu-cluster/configure.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cluster/ubuntu-cluster/configure.sh b/cluster/ubuntu-cluster/configure.sh index 75180f0ea18..fc724e42cdc 100755 --- a/cluster/ubuntu-cluster/configure.sh +++ b/cluster/ubuntu-cluster/configure.sh @@ -143,7 +143,6 @@ do mm[$i]=$name let ii++ done -echo # input node IPs while true; do @@ -168,7 +167,13 @@ while true; do sed -i "s/MASTER_IP/${masterIP}/g" default_scripts/kube-proxy # For master set MINION IPs in kube-controller-manager - minionIPs="$minionIPs,$myIP" + if [ -z "$minionIPs" ]; then + #one node act as both minion and master role + minionIPs="$myIP" + else + minionIPs="$minionIPs,$myIP" + fi + sed -i "s/MINION_IPS/${minionIPs}/g" default_scripts/kube-controller-manager cpMaster