Federation build and e2e test integration

Federation components are now buildable and e2e-testable via e2e.go.
This commit is contained in:
Colin Hom
2016-05-10 14:44:45 -07:00
parent 025b017277
commit a092fd2dd4
34 changed files with 926 additions and 48 deletions

View File

@@ -99,3 +99,33 @@ PROVIDER_UTILS="${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh"
if [ -f ${PROVIDER_UTILS} ]; then
source "${PROVIDER_UTILS}"
fi
# Federation utils
# Should NOT be called within the global scope, unless setting the desired global zone vars
# This function is currently NOT USED in the global scope
function set-federated-zone-vars {
zone="$1"
export OVERRIDE_CONTEXT="federation-e2e-${KUBERNETES_PROVIDER}-$zone"
echo "Setting zone vars to: $OVERRIDE_CONTEXT"
if [[ "$KUBERNETES_PROVIDER" == "gce" ]];then
export KUBE_GCE_ZONE="$zone"
# gcloud has a 61 character limit, and for firewall rules this
# prefix gets appended to itslef, with some extra information
# need tot keep it short
export KUBE_GCE_INSTANCE_PREFIX="${USER}-${zone}"
elif [[ "$KUBERNETES_PROVIDER" == "gke" ]];then
export CLUSTER_NAME="${USER}-${zone}"
elif [[ "$KUBERNETES_PROVIDER" == "aws" ]];then
export KUBE_AWS_ZONE="$zone"
export KUBE_AWS_INSTANCE_PREFIX="${USER}-${zone}"
else
echo "Provider \"${KUBERNETES_PROVIDER}\" is not supported"
exit 1
fi
}