mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-09 07:33:52 +00:00
use new --filter syntax in scripts to remove orphaned Kind/GKE clusters
The old filter syntax is deprecated by Google.
This commit is contained in:
@@ -22,7 +22,7 @@ gcloud auth activate-service-account \
|
||||
|
||||
all_cloud=($(gcloud container clusters list \
|
||||
--zone "$CLUSTER_ZONE" --project "$GCP_PROJECT" \
|
||||
--filter "name:gke-*-zone-${CLUSTER_ZONE}" --format 'table[no-heading](name)' | sort))
|
||||
--filter "name~gke-[a-f0-9]+-zone-${CLUSTER_ZONE}" --format 'table[no-heading](name)' | sort))
|
||||
|
||||
now_in_seconds_since_epoch=$(date +"%s")
|
||||
hours_ago_to_delete=2
|
||||
|
||||
@@ -38,7 +38,7 @@ fi
|
||||
|
||||
all_cloud=($(gcloud compute instances list \
|
||||
--zones "$INSTANCE_ZONE" --project "$GCP_PROJECT" \
|
||||
--filter 'name:kind-worker-*' --format 'table[no-heading](name)' | sort))
|
||||
--filter 'name~kind-worker-[a-f0-9]+' --format 'table[no-heading](name)' | sort))
|
||||
|
||||
exists_in_local_but_not_cloud=()
|
||||
for i in "${all_local[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user