From cd5e658518abb0f724479725a249d6b4e47c6b1f Mon Sep 17 00:00:00 2001 From: danielqsj Date: Thu, 24 Jan 2019 18:06:55 +0800 Subject: [PATCH 1/2] fix shellcheck in cluster/local --- cluster/local/util.sh | 2 +- hack/.shellcheck_failures | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cluster/local/util.sh b/cluster/local/util.sh index 312b7df6eb0..73eab5ed869 100755 --- a/cluster/local/util.sh +++ b/cluster/local/util.sh @@ -21,6 +21,6 @@ function prepare-e2e() { function detect-master { KUBE_MASTER=localhost KUBE_MASTER_IP=127.0.0.1 - KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" + export KUBE_MASTER_URL="http://${KUBE_MASTER_IP}:8080" echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)" } diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index 07f643d7a34..8bed277bd99 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -43,7 +43,6 @@ ./cluster/kubemark/gce/config-default.sh ./cluster/kubemark/iks/config-default.sh ./cluster/kubemark/util.sh -./cluster/local/util.sh ./cluster/log-dump/log-dump.sh ./cluster/pre-existing/util.sh ./cluster/restore-from-backup.sh From f02a98608110af024ef31364dee20be4c43b63dc Mon Sep 17 00:00:00 2001 From: danielqsj Date: Sun, 24 Feb 2019 20:35:46 +0800 Subject: [PATCH 2/2] add comments to shell function --- cluster/local/util.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cluster/local/util.sh b/cluster/local/util.sh index 73eab5ed869..da262fdf249 100755 --- a/cluster/local/util.sh +++ b/cluster/local/util.sh @@ -18,6 +18,13 @@ function prepare-e2e() { echo "Local doesn't need special preparations for e2e tests" 1>&2 } +# Detect the IP for the master +# +# Vars set: +# KUBE_MASTER +# KUBE_MASTER_IP +# Vars exported: +# KUBE_MASTER_URL function detect-master { KUBE_MASTER=localhost KUBE_MASTER_IP=127.0.0.1