mirror of https://github.com/k3s-io/k3s
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.pull/6/head
commit
09e5fa62b5
|
@ -367,15 +367,18 @@ function detect-nodes() {
|
|||
function detect-master() {
|
||||
detect-project
|
||||
KUBE_MASTER=${MASTER_NAME}
|
||||
echo "Trying to find master named '${MASTER_NAME}'" >&2
|
||||
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)')
|
||||
fi
|
||||
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
|
||||
exit 1
|
||||
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
|
||||
|
|
|
@ -428,7 +428,7 @@ func Test() bool {
|
|||
}
|
||||
|
||||
// TODO(fejta): add a --federated or something similar
|
||||
if os.Getenv("FEDERATION") == "" {
|
||||
if os.Getenv("FEDERATION") != "true" {
|
||||
if *checkNodeCount {
|
||||
ValidateClusterSize()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue