Skip to content

Commit 062d00d

Browse files
redhat-appstudio-qe-botRoming22
authored andcommitted
fixed issue of destroying exisint clusters
1 parent fee86e1 commit 062d00d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ci/images/ci-runner/hack/bin/destroy-clusters.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ EXCLUDE_CLUSTER=(local-cluster)
1717

1818
delete_cluster() {
1919
cluster_name="$1"
20+
# if hostedcluster doesn't exist, skip
21+
if ! kubectl get hostedcluster -n clusters "$cluster_name" > /dev/null 2>&1; then
22+
return
23+
fi
2024
deletionTimestamp=$(kubectl get hostedcluster -n clusters "$cluster_name" -o json \
2125
| jq -r '.metadata.deletionTimestamp?'
2226
)

0 commit comments

Comments
 (0)