Commit 8c61829d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #44117 from madhusudancs/fed-e2e-name-for-parallel-presubmit

Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072) Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts. This is consistent with how kubefed creates kubeconfig contexts. **Release note**: --> ```release-note NONE ```
parents bbf15d5c 5af5378f
...@@ -24,7 +24,7 @@ source "${KUBE_ROOT}/cluster/kube-util.sh" ...@@ -24,7 +24,7 @@ source "${KUBE_ROOT}/cluster/kube-util.sh"
# kubefed configuration # kubefed configuration
FEDERATION_NAME="${FEDERATION_NAME:-e2e-federation}" FEDERATION_NAME="${FEDERATION_NAME:-e2e-federation}"
FEDERATION_NAMESPACE=${FEDERATION_NAMESPACE:-federation-system} FEDERATION_NAMESPACE=${FEDERATION_NAMESPACE:-federation-system}
FEDERATION_KUBE_CONTEXT="${FEDERATION_KUBE_CONTEXT:-e2e-federation}" FEDERATION_KUBE_CONTEXT="${FEDERATION_KUBE_CONTEXT:-${FEDERATION_NAME}}"
HOST_CLUSTER_ZONE="${FEDERATION_HOST_CLUSTER_ZONE:-}" HOST_CLUSTER_ZONE="${FEDERATION_HOST_CLUSTER_ZONE:-}"
# If $HOST_CLUSTER_ZONE isn't specified, arbitrarily choose # If $HOST_CLUSTER_ZONE isn't specified, arbitrarily choose
# last zone as the host cluster zone. # last zone as the host cluster zone.
......
...@@ -107,7 +107,7 @@ function join_clusters() { ...@@ -107,7 +107,7 @@ function join_clusters() {
"${context}" \ "${context}" \
--federation-system-namespace=${FEDERATION_NAMESPACE} \ --federation-system-namespace=${FEDERATION_NAMESPACE} \
--host-cluster-context="${HOST_CLUSTER_CONTEXT}" \ --host-cluster-context="${HOST_CLUSTER_CONTEXT}" \
--context="${FEDERATION_NAME}" \ --context="${FEDERATION_KUBE_CONTEXT}" \
--secret-name="${context//_/-}" # Replace "_" by "-" --secret-name="${context//_/-}" # Replace "_" by "-"
done done
} }
......
...@@ -21,10 +21,14 @@ set -o pipefail ...@@ -21,10 +21,14 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/cluster/kube-util.sh" source "${KUBE_ROOT}/cluster/kube-util.sh"
source "${KUBE_ROOT}/federation/cluster/common.sh"
: "${FEDERATION_HOST_CLUSTER_ZONE?Must set FEDERATION_HOST_CLUSTER_ZONE env var}" : "${FEDERATION_HOST_CLUSTER_ZONE?Must set FEDERATION_HOST_CLUSTER_ZONE env var}"
( (
set-federation-zone-vars "${FEDERATION_HOST_CLUSTER_ZONE}" set-federation-zone-vars "${FEDERATION_HOST_CLUSTER_ZONE}"
# Export FEDERATION_KUBE_CONTEXT to ensure that it is available to
# ginkgo-e2e.sh and is thus passed on to the federation tests.
export FEDERATION_KUBE_CONTEXT
"${KUBE_ROOT}/hack/ginkgo-e2e.sh" $@ "${KUBE_ROOT}/hack/ginkgo-e2e.sh" $@
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment