Split federation-{up,down} from e2e-{up,down}.

This commit is contained in:
Madhusudan.C.S
2017-02-19 02:21:21 -08:00
parent ee88325f81
commit edef3af34f
5 changed files with 26 additions and 52 deletions

View File

@@ -29,25 +29,10 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
prepare-e2e
if [[ "${FEDERATION:-}" == "true" ]];then
if [[ "${FEDERATION:-}" == "true" ]]; then
source "${KUBE_ROOT}/federation/cluster/common.sh"
if cleanup-federation-api-objects; then
# TODO(madhusudancs): This is an arbitrary amount of sleep to give
# Kubernetes clusters enough time to delete the underlying cloud
# provider resources corresponding to the Kubernetes resources we
# deleted as part of the test tear downs. It is shameful that we
# are doing this, but this is just a bandage to stop the bleeding.
# Please don't use this pattern anywhere. Remove this when proper
# cloud provider cleanups are implemented in the individual test
# `AfterEach` blocks.
# Also, we wait only if the cleanup succeeds.
sleep 2m
else
echo "Couldn't cleanup federation api objects"
fi
for zone in ${E2E_ZONES}; do
for zone in ${E2E_ZONES};do
# bring down an e2e cluster
(
set-federation-zone-vars "$zone"

View File

@@ -30,24 +30,15 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
prepare-e2e
if [[ "${FEDERATION:-}" == "true" ]]; then
cur_ip_octet2=180
# TODO(colhom): the last cluster that was created in the loop above is the current context.
# Hence, it will be the cluster that hosts the federated components.
# In the future, we will want to loop through the all the federated contexts,
# select each one and call federated-up
for zone in ${E2E_ZONES};do
(
export CLUSTER_IP_RANGE="10.${cur_ip_octet2}.0.0/16"
set-federation-zone-vars "$zone"
test-setup
)
cur_ip_octet2="$((cur_ip_octet2 + 1))"
done
# Sets ${CLUSTER_CONTEXT}
kubeconfig-federation-context "${zone}"
"${KUBE_ROOT}/federation/cluster/federation-up.sh" "${CLUSTER_CONTEXT}"
cur_ip_octet2=180
for zone in ${E2E_ZONES};do
(
export CLUSTER_IP_RANGE="10.${cur_ip_octet2}.0.0/16"
set-federation-zone-vars "$zone"
test-setup
)
cur_ip_octet2="$((cur_ip_octet2 + 1))"
done
else
test-setup
test-setup
fi