mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	make more of the shell pass lints
This commit is contained in:
		@@ -18,16 +18,16 @@
 | 
				
			|||||||
PROJECT=${PROJECT:-kubernetes-jenkins}
 | 
					PROJECT=${PROJECT:-kubernetes-jenkins}
 | 
				
			||||||
REGION=${REGION:-us-central1}
 | 
					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
 | 
					result=0
 | 
				
			||||||
for x in ${LIST}; do
 | 
					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}"
 | 
						echo DELETING "${x}"
 | 
				
			||||||
	gcloud compute --project=${PROJECT} firewall-rules delete "k8s-fw-${x}" -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}" forwarding-rules delete "${x}" --region="${REGION}" -q
 | 
				
			||||||
	gcloud compute --project=${PROJECT} addresses 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}" target-pools delete "${x}" --region="${REGION}" -q
 | 
				
			||||||
        result=1
 | 
					        result=1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,14 +17,14 @@
 | 
				
			|||||||
echo "Removing empty directories from etcd..."
 | 
					echo "Removing empty directories from etcd..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cleanup_empty_dirs () {
 | 
					cleanup_empty_dirs () {
 | 
				
			||||||
  if [ "$(${ETCDCTL} ls $1)" ]; then
 | 
					  if [ "$("${ETCDCTL}" ls "${1}")" ]; then
 | 
				
			||||||
    for SUBDIR in $(${ETCDCTL} ls -p $1 | grep "/$")
 | 
					    for SUBDIR in $("${ETCDCTL}" ls -p "${1}" | grep "/$")
 | 
				
			||||||
    do
 | 
					    do
 | 
				
			||||||
      cleanup_empty_dirs ${SUBDIR}
 | 
					      cleanup_empty_dirs "${SUBDIR}"
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    echo "Removing empty key $1 ..."
 | 
					    echo "Removing empty key $1 ..."
 | 
				
			||||||
    ${ETCDCTL} rmdir $1
 | 
					    "${ETCDCTL}" rmdir "${1}"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -33,5 +33,5 @@ do
 | 
				
			|||||||
  echo "Starting cleanup..."
 | 
					  echo "Starting cleanup..."
 | 
				
			||||||
  cleanup_empty_dirs "/registry"
 | 
					  cleanup_empty_dirs "/registry"
 | 
				
			||||||
  echo "Done with cleanup."
 | 
					  echo "Done with cleanup."
 | 
				
			||||||
  sleep ${SLEEP_SECOND}
 | 
					  sleep "${SLEEP_SECOND}"
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,6 @@
 | 
				
			|||||||
./cluster/gce/config-common.sh
 | 
					./cluster/gce/config-common.sh
 | 
				
			||||||
./cluster/gce/config-default.sh
 | 
					./cluster/gce/config-default.sh
 | 
				
			||||||
./cluster/gce/config-test.sh
 | 
					./cluster/gce/config-test.sh
 | 
				
			||||||
./cluster/gce/delete-stranded-load-balancers.sh
 | 
					 | 
				
			||||||
./cluster/gce/gci/configure-helper.sh
 | 
					./cluster/gce/gci/configure-helper.sh
 | 
				
			||||||
./cluster/gce/gci/configure.sh
 | 
					./cluster/gce/gci/configure.sh
 | 
				
			||||||
./cluster/gce/gci/flexvolume_node_setup.sh
 | 
					./cluster/gce/gci/flexvolume_node_setup.sh
 | 
				
			||||||
@@ -21,7 +20,6 @@
 | 
				
			|||||||
./cluster/gce/upgrade.sh
 | 
					./cluster/gce/upgrade.sh
 | 
				
			||||||
./cluster/gce/util.sh
 | 
					./cluster/gce/util.sh
 | 
				
			||||||
./cluster/images/conformance/run_e2e.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/prereqs/ubuntu-juju.sh
 | 
				
			||||||
./cluster/juju/util.sh
 | 
					./cluster/juju/util.sh
 | 
				
			||||||
./cluster/kube-down.sh
 | 
					./cluster/kube-down.sh
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user