File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33CLUSTER_NAME=${CLUSTER_NAME:? CLUSTER_NAME is required}
44KEIGHTS=${KEIGHTS:? KEIGHTS is required}
55TIMEOUT_SECONDS=${TIMEOUT_SECONDS:- 900}
6- INTERVAL_SECONDS=${INTERVAL_SECONDS:- 10}
6+ INTERVAL_SECONDS=${INTERVAL_SECONDS:- 5}
7+ QUIET=${QUIET:- false}
78
89kubectl () {
9- ${KEIGHTS} kubectl --cluster-name ${CLUSTER_NAME} -- " ${@ } "
10+ if [ " ${QUIET} " = " true" ]; then
11+ ${KEIGHTS} kubectl --cluster-name ${CLUSTER_NAME} -- " ${@ } " > /dev/null 2>&1
12+ else
13+ ${KEIGHTS} kubectl --cluster-name ${CLUSTER_NAME} -- " ${@ } "
14+ fi
1015}
1116
1217now=$( date +%s)
1318deadline=$(( ${now} + ${TIMEOUT_SECONDS} ))
1419
1520echo " Waiting for API server..."
1621while true ; do
17- if kubectl get --raw /readyz > /dev/null 2>&1 ; then
22+ if kubectl get --raw /readyz; then
1823 break
1924 fi
2025 now=$( date +%s)
2732
2833echo " Waiting for nodes to be Ready..."
2934while true ; do
30- if kubectl wait --for=condition=Ready nodes --all --timeout=1s > /dev/null 2>&1 ; then
35+ if kubectl wait --for=condition=Ready nodes --all --timeout=1s; then
3136 break
3237 fi
3338 now=$( date +%s)
You can’t perform that action at this time.
0 commit comments