mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Fix test commands in cluster/gce/util.sh
This commit is contained in:
parent
64f6606833
commit
536f48ef15
@ -74,11 +74,11 @@ set-node-image
|
|||||||
|
|
||||||
# Verfiy cluster autoscaler configuration.
|
# Verfiy cluster autoscaler configuration.
|
||||||
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
|
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
|
||||||
if [ -z $AUTOSCALER_MIN_NODES ]; then
|
if [[ -z $AUTOSCALER_MIN_NODES ]]; then
|
||||||
echo "AUTOSCALER_MIN_NODES not set."
|
echo "AUTOSCALER_MIN_NODES not set."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -z $AUTOSCALER_MAX_NODES ]; then
|
if [[ -z $AUTOSCALER_MAX_NODES ]]; then
|
||||||
echo "AUTOSCALER_MAX_NODES not set."
|
echo "AUTOSCALER_MAX_NODES not set."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -434,7 +434,7 @@ function create-static-ip() {
|
|||||||
while true; do
|
while true; do
|
||||||
now="$(date +%s)"
|
now="$(date +%s)"
|
||||||
# Timeout set to 15 minutes
|
# Timeout set to 15 minutes
|
||||||
if [ $((now - start)) -gt 900 ]; then
|
if [[ $((now - start)) -gt 900 ]]; then
|
||||||
echo "Timeout while waiting for master IP visibility"
|
echo "Timeout while waiting for master IP visibility"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@ -570,7 +570,7 @@ function create-node-template() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local local_ssds=""
|
local local_ssds=""
|
||||||
if [ ! -z ${NODE_LOCAL_SSDS+x} ]; then
|
if [[ ! -z ${NODE_LOCAL_SSDS+x} ]]; then
|
||||||
for i in $(seq ${NODE_LOCAL_SSDS}); do
|
for i in $(seq ${NODE_LOCAL_SSDS}); do
|
||||||
local_ssds="$local_ssds--local-ssd=interface=SCSI "
|
local_ssds="$local_ssds--local-ssd=interface=SCSI "
|
||||||
done
|
done
|
||||||
@ -726,7 +726,7 @@ function kube-up() {
|
|||||||
function check-existing() {
|
function check-existing() {
|
||||||
local running_in_terminal=false
|
local running_in_terminal=false
|
||||||
# May be false if tty is not allocated (for example with ssh -T).
|
# May be false if tty is not allocated (for example with ssh -T).
|
||||||
if [ -t 1 ]; then
|
if [[ -t 1 ]]; then
|
||||||
running_in_terminal=true
|
running_in_terminal=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -827,7 +827,7 @@ function create-subnetworks() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z ${NODE_IP_RANGE:-} ]; then
|
if [[ -z ${NODE_IP_RANGE:-} ]]; then
|
||||||
echo "${color_red}NODE_IP_RANGE must be specified{color_norm}"
|
echo "${color_red}NODE_IP_RANGE must be specified{color_norm}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -1242,7 +1242,7 @@ function create-nodes-template() {
|
|||||||
|
|
||||||
# TODO(zmerlynn): Refactor setting scope flags.
|
# TODO(zmerlynn): Refactor setting scope flags.
|
||||||
local scope_flags=
|
local scope_flags=
|
||||||
if [ -n "${NODE_SCOPES}" ]; then
|
if [[ -n "${NODE_SCOPES}" ]]; then
|
||||||
scope_flags="--scopes ${NODE_SCOPES}"
|
scope_flags="--scopes ${NODE_SCOPES}"
|
||||||
else
|
else
|
||||||
scope_flags="--no-scopes"
|
scope_flags="--no-scopes"
|
||||||
@ -1877,7 +1877,7 @@ function prepare-push() {
|
|||||||
|
|
||||||
# TODO(zmerlynn): Refactor setting scope flags.
|
# TODO(zmerlynn): Refactor setting scope flags.
|
||||||
local scope_flags=
|
local scope_flags=
|
||||||
if [ -n "${NODE_SCOPES}" ]; then
|
if [[ -n "${NODE_SCOPES}" ]]; then
|
||||||
scope_flags="--scopes ${NODE_SCOPES}"
|
scope_flags="--scopes ${NODE_SCOPES}"
|
||||||
else
|
else
|
||||||
scope_flags="--no-scopes"
|
scope_flags="--no-scopes"
|
||||||
|
Loading…
Reference in New Issue
Block a user