Adding secrets for kubernetes clusters as well

This commit is contained in:
nikhiljindal
2016-06-07 17:30:15 -07:00
parent b4da46974c
commit 9443bf0f9c
2 changed files with 30 additions and 10 deletions

View File

@@ -896,7 +896,18 @@ function check-cluster() {
export CONTEXT="${PROJECT}_${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
)
# ensures KUBECONFIG is set