Commit 47738087 authored by Elson O Rodriguez's avatar Elson O Rodriguez Committed by Lukasz Zajaczkowski

Improved user experience for users of OpenStack provider behind a proxy.

parent 8315734b
......@@ -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
......
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment