mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Fix the scripts to optionally skip prompts and also return successfully no matter what.
This commit is contained in:
parent
1aa2b97792
commit
6fd376a04f
@ -24,6 +24,8 @@ source "${KUBE_ROOT}/cluster/common.sh"
|
|||||||
|
|
||||||
NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion"
|
NODE_INSTANCE_PREFIX="${INSTANCE_PREFIX}-minion"
|
||||||
|
|
||||||
|
KUBE_PROMPT_FOR_UPDATE=y
|
||||||
|
|
||||||
# Verify prereqs
|
# Verify prereqs
|
||||||
function verify-prereqs {
|
function verify-prereqs {
|
||||||
local cmd
|
local cmd
|
||||||
@ -43,8 +45,11 @@ function verify-prereqs {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# update and install components as needed
|
# update and install components as needed
|
||||||
gcloud components update preview
|
if [[ "${KUBE_PROMPT_FOR_UPDATE}" != "y" ]]; then
|
||||||
gcloud components update
|
gcloud_prompt="-q"
|
||||||
|
fi
|
||||||
|
gcloud ${gcloud_prompt:-} components update preview || true
|
||||||
|
gcloud ${gcloud_prompt:-} components update || true
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create a temp dir that'll be deleted at the end of this bash session.
|
# Create a temp dir that'll be deleted at the end of this bash session.
|
||||||
|
Loading…
Reference in New Issue
Block a user