mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #31294 from mml/federated-oops
Automatic merge from submit-queue Fix e2e logic when FEDERATION=false. Also add debugging output to GCE detect-master. Fixes #31285.
This commit is contained in:
commit
09e5fa62b5
@ -367,15 +367,18 @@ function detect-nodes() {
|
|||||||
function detect-master() {
|
function detect-master() {
|
||||||
detect-project
|
detect-project
|
||||||
KUBE_MASTER=${MASTER_NAME}
|
KUBE_MASTER=${MASTER_NAME}
|
||||||
|
echo "Trying to find master named '${MASTER_NAME}'" >&2
|
||||||
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
||||||
KUBE_MASTER_IP=$(gcloud compute addresses describe "${MASTER_NAME}-ip" \
|
local master_address_name="${MASTER_NAME}-ip"
|
||||||
|
echo "Looking for address '${master_address_name}'" >&2
|
||||||
|
KUBE_MASTER_IP=$(gcloud compute addresses describe "${master_address_name}" \
|
||||||
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
|
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
|
||||||
fi
|
fi
|
||||||
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
if [[ -z "${KUBE_MASTER_IP-}" ]]; then
|
||||||
echo "Could not detect Kubernetes master node. Make sure you've launched a cluster with 'kube-up.sh'" >&2
|
echo "Could not detect Kubernetes master node. Make sure you've launched a cluster with 'kube-up.sh'" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)"
|
echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reads kube-env metadata from master
|
# Reads kube-env metadata from master
|
||||||
|
@ -428,7 +428,7 @@ func Test() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(fejta): add a --federated or something similar
|
// TODO(fejta): add a --federated or something similar
|
||||||
if os.Getenv("FEDERATION") == "" {
|
if os.Getenv("FEDERATION") != "true" {
|
||||||
if *checkNodeCount {
|
if *checkNodeCount {
|
||||||
ValidateClusterSize()
|
ValidateClusterSize()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user