mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 11:42:14 +00:00
Federation build and e2e test integration
Federation components are now buildable and e2e-testable via e2e.go.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user