Create kubeconfig for cluster secrets on other cloud providers as well

This commit is contained in:
nikhiljindal
2016-06-13 18:37:07 -07:00
parent a3f09700e5
commit 657a7ef6a4
4 changed files with 38 additions and 0 deletions

View File

@@ -1304,7 +1304,18 @@ function build-config() {
export CONTEXT="aws_${INSTANCE_PREFIX}"
(
umask 077
# Update the user's kubeconfig to include credentials for this apiserver.
create-kubeconfig
if [[ "${FEDERATION:-}" == "true" ]]; then
# Create a kubeconfig with credentials for this apiserver. We will later use
# this kubeconfig to create a secret which the federation control plane can
# use to talk to this apiserver.
KUBECONFIG_DIR=$(dirname ${KUBECONFIG:-$DEFAULT_KUBECONFIG})
KUBECONFIG="${KUBECONFIG_DIR}/federation/kubernetes-apiserver/${CONTEXT}/kubeconfig" \
create-kubeconfig
fi
)
}