mirror of https://github.com/k3s-io/k3s
Merge pull request #74192 from xichengliudui/fixshellcheck190218
make more of the shell pass lintspull/564/head
commit
6c1f2077e5
|
@ -18,16 +18,16 @@
|
|||
PROJECT=${PROJECT:-kubernetes-jenkins}
|
||||
REGION=${REGION:-us-central1}
|
||||
|
||||
LIST=$(gcloud --project=${PROJECT} compute target-pools list --format='value(name)')
|
||||
LIST=$(gcloud --project="${PROJECT}" compute target-pools list --format='value(name)')
|
||||
|
||||
result=0
|
||||
for x in ${LIST}; do
|
||||
if ! gcloud compute --project=${PROJECT} target-pools get-health "${x}" --region=${REGION} 2>/dev/null >/dev/null; then
|
||||
if ! gcloud compute --project="${PROJECT}" target-pools get-health "${x}" --region="${REGION}" 2>/dev/null >/dev/null; then
|
||||
echo DELETING "${x}"
|
||||
gcloud compute --project=${PROJECT} firewall-rules delete "k8s-fw-${x}" -q
|
||||
gcloud compute --project=${PROJECT} forwarding-rules delete "${x}" --region=${REGION} -q
|
||||
gcloud compute --project=${PROJECT} addresses delete "${x}" --region=${REGION} -q
|
||||
gcloud compute --project=${PROJECT} target-pools delete "${x}" --region=${REGION} -q
|
||||
gcloud compute --project="${PROJECT}" firewall-rules delete "k8s-fw-${x}" -q
|
||||
gcloud compute --project="${PROJECT}" forwarding-rules delete "${x}" --region="${REGION}" -q
|
||||
gcloud compute --project="${PROJECT}" addresses delete "${x}" --region="${REGION}" -q
|
||||
gcloud compute --project="${PROJECT}" target-pools delete "${x}" --region="${REGION}" -q
|
||||
result=1
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
echo "Removing empty directories from etcd..."
|
||||
|
||||
cleanup_empty_dirs () {
|
||||
if [ "$(${ETCDCTL} ls $1)" ]; then
|
||||
for SUBDIR in $(${ETCDCTL} ls -p $1 | grep "/$")
|
||||
if [ "$("${ETCDCTL}" ls "${1}")" ]; then
|
||||
for SUBDIR in $("${ETCDCTL}" ls -p "${1}" | grep "/$")
|
||||
do
|
||||
cleanup_empty_dirs ${SUBDIR}
|
||||
cleanup_empty_dirs "${SUBDIR}"
|
||||
done
|
||||
else
|
||||
echo "Removing empty key $1 ..."
|
||||
${ETCDCTL} rmdir $1
|
||||
"${ETCDCTL}" rmdir "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -33,5 +33,5 @@ do
|
|||
echo "Starting cleanup..."
|
||||
cleanup_empty_dirs "/registry"
|
||||
echo "Done with cleanup."
|
||||
sleep ${SLEEP_SECOND}
|
||||
sleep "${SLEEP_SECOND}"
|
||||
done
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
./cluster/gce/config-common.sh
|
||||
./cluster/gce/config-default.sh
|
||||
./cluster/gce/config-test.sh
|
||||
./cluster/gce/delete-stranded-load-balancers.sh
|
||||
./cluster/gce/gci/configure-helper.sh
|
||||
./cluster/gce/gci/configure.sh
|
||||
./cluster/gce/gci/flexvolume_node_setup.sh
|
||||
|
@ -21,7 +20,6 @@
|
|||
./cluster/gce/upgrade.sh
|
||||
./cluster/gce/util.sh
|
||||
./cluster/images/conformance/run_e2e.sh
|
||||
./cluster/images/etcd-empty-dir-cleanup/etcd-empty-dir-cleanup.sh
|
||||
./cluster/juju/prereqs/ubuntu-juju.sh
|
||||
./cluster/juju/util.sh
|
||||
./cluster/kube-up.sh
|
||||
|
|
Loading…
Reference in New Issue