#!/bin/bash

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

project="cilium-ci"
region="us-west1"

if [ ! -f "${script_dir}/cluster_uri"  ]; then
    echo "Cluster uri file not found, exiting"
    exit 1
fi


cluster_uri="$(cat "${script_dir}/cluster-uri")"
cluster_name=${cluster_uri##*/}

gcloud container clusters delete --quiet --zone ${region} "${cluster_uri}"

export KUBECONFIG="${script_dir}/resize-kubeconfig"
gcloud container clusters get-credentials --project "${project}" --region "europe-west4" management-cluster-0
kubectl delete containerclusters.container.cnrm.cloud.google.com -n test-clusters "${cluster_name}"
kubectl delete containernodepools.container.cnrm.cloud.google.com -n test-clusters "${cluster_name}"

rm -f "${script_dir}/cluster-uri" "${script_dir}/cluster-name" "${script_dir}/cluster-version" "${script_dir}/registry-adder.yaml"

#!/bin/bash

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

project="cilium-ci"
region="us-west1"

if [ ! -f "${script_dir}/cluster-uri"  ]; then
    echo "Cluster uri file not found, exiting"
    exit 1
fi


cluster_uri="$(cat "${script_dir}/cluster-uri")"
cluster_name=${cluster_uri##*/}

gcloud container clusters delete --quiet --zone ${region} "${cluster_uri}"

export KUBECONFIG="${script_dir}/resize-kubeconfig"
gcloud container clusters get-credentials --project "${project}" --region "europe-west4" management-cluster-0
kubectl delete containerclusters.container.cnrm.cloud.google.com -n test-clusters "${cluster_name}"
kubectl delete containernodepools.container.cnrm.cloud.google.com -n test-clusters "${cluster_name}"

rm -f "${script_dir}/cluster-uri" "${script_dir}/cluster-name" "${script_dir}/cluster-version" "${script_dir}/registry-adder.yaml"

Fix typo in gke cluster release script
Fix typo in gke cluster release script

Signed-off-by: Maciej Kwiek <33c1fdf481c8e628d4c6db7ea8dc77f49f2fa5d7@isovalent.com>
