mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
fix shellcheck failures list-resources.sh
update pull request update pull request update pull request
This commit is contained in:
parent
20b76a2b4a
commit
c4898d6f56
@ -49,20 +49,20 @@ function gcloud-list() {
|
|||||||
local attempt=1
|
local attempt=1
|
||||||
local result=""
|
local result=""
|
||||||
while true; do
|
while true; do
|
||||||
if result=$(gcloud ${group} ${resource} list --project=${PROJECT} ${filter:+--filter="$filter"} ${@:4}); then
|
if result=$(gcloud "${group}" "${resource}" list --project="${PROJECT}" "${filter:+--filter="$filter"}" "${@:4}"); then
|
||||||
if [[ ! -z "${GREP_REGEX}" ]]; then
|
if [[ -n "${GREP_REGEX:-}" ]]; then
|
||||||
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
|
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
|
||||||
fi
|
fi
|
||||||
echo "${result}"
|
echo "${result}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
|
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
|
||||||
attempt=$(($attempt+1))
|
attempt=$((attempt + 1))
|
||||||
if [[ ${attempt} -gt 5 ]]; then
|
if [[ ${attempt} -gt 5 ]]; then
|
||||||
echo -e "List ${resource} failed!" >&2
|
echo -e "List ${resource} failed!" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
sleep $((5*${attempt}))
|
sleep $((5 * attempt))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
./cluster/gce/gci/flexvolume_node_setup.sh
|
./cluster/gce/gci/flexvolume_node_setup.sh
|
||||||
./cluster/gce/gci/health-monitor.sh
|
./cluster/gce/gci/health-monitor.sh
|
||||||
./cluster/gce/gci/master-helper.sh
|
./cluster/gce/gci/master-helper.sh
|
||||||
./cluster/gce/list-resources.sh
|
|
||||||
./cluster/gce/upgrade-aliases.sh
|
./cluster/gce/upgrade-aliases.sh
|
||||||
./cluster/gce/upgrade.sh
|
./cluster/gce/upgrade.sh
|
||||||
./cluster/gce/util.sh
|
./cluster/gce/util.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user