mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Fix detect-node-names to not error out if there are no nodes
This commit is contained in:
parent
3b09c64161
commit
5487a3f8f6
@ -284,12 +284,9 @@ function detect-node-names {
|
|||||||
"${group}" --zone "${ZONE}" --project "${PROJECT}" \
|
"${group}" --zone "${ZONE}" --project "${PROJECT}" \
|
||||||
--format='value(instance)'))
|
--format='value(instance)'))
|
||||||
done
|
done
|
||||||
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]}" >&2
|
|
||||||
echo "NODE_NAMES=${NODE_NAMES[*]}" >&2
|
|
||||||
else
|
|
||||||
echo "INSTANCE_GROUPS=" >&2
|
|
||||||
echo "NODE_NAMES=" >&2
|
|
||||||
fi
|
fi
|
||||||
|
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]:-}" >&2
|
||||||
|
echo "NODE_NAMES=${NODE_NAMES[*]:-}" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
# Detect the information about the minions
|
# Detect the information about the minions
|
||||||
|
@ -251,7 +251,7 @@ function detect-node-names {
|
|||||||
"${NODE_INSTANCE_GROUP}" --zone "${ZONE}" --project "${PROJECT}" \
|
"${NODE_INSTANCE_GROUP}" --zone "${ZONE}" --project "${PROJECT}" \
|
||||||
--format='value(instance)'))
|
--format='value(instance)'))
|
||||||
|
|
||||||
echo "NODE_NAMES=${NODE_NAMES[*]}"
|
echo "NODE_NAMES=${NODE_NAMES[*]:-}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Detect instance group name generated by gke.
|
# Detect instance group name generated by gke.
|
||||||
|
Loading…
Reference in New Issue
Block a user