Skip to content

Commit

Permalink
Improved user experience for users of OpenStack provider behind a proxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
elsonrodriguez authored and Lukasz Zajaczkowski committed Apr 28, 2016
1 parent 8315734 commit 4773808
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cluster/kube-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ elif [[ "${validate_result}" == "2" ]]; then
echo "...ignoring non-fatal errors in validate-cluster" >&2
fi

if [[ "${ENABLE_PROXY:-}" == "true" ]]; then
. /tmp/kube-proxy-env
echo ""
echo "*** Please run the following to add the kube-apiserver endpoint to your proxy white-list ***"
cat /tmp/kube-proxy-env
echo "*** ***"
echo ""
fi

echo -e "Done, listing cluster services:\n" >&2
"${KUBE_ROOT}/cluster/kubectl.sh" cluster-info
echo
Expand Down
7 changes: 7 additions & 0 deletions cluster/openstack/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ function configure-kubectl() {
export KUBE_MASTER_IP=$(nova show "${STACK_NAME}"-master | awk '$3=="network" {print $6}')
export CONTEXT="openstack-${STACK_NAME}"
export KUBE_BEARER_TOKEN="TokenKubelet"

if [[ "${ENABLE_PROXY:-}" == "true" ]]; then
echo 'export NO_PROXY=$NO_PROXY,'"${KUBE_MASTER_IP}" > /tmp/kube-proxy-env
echo 'export no_proxy=$NO_PROXY,'"${KUBE_MASTER_IP}" >> /tmp/kube-proxy-env
. /tmp/kube-proxy-env
fi

create-kubeconfig
}

Expand Down

0 comments on commit 4773808

Please sign in to comment.