Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add confirmation prompt to kctf cluster stop for GKE #374

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dist/bin/kctf-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ function kctf_cluster_start {
}

function kctf_cluster_stop_gce {
read -p "Do you really want to delete the GKE cluster? If you are sure type the cluster name (${CLUSTER_NAME}): "
if [[ ! "${REPLY}" = "${CLUSTER_NAME}" ]]
then
return 1
fi
_kctf_log "deleting all challenges so that load balancers etc can be cleaned up"
CHALLENGES=$("${KCTF_BIN}/kubectl" get challenge --all-namespaces -o=jsonpath='{range .items[*]}{@.metadata.namespace}{"/"}{@.metadata.name}{" "}{end}')
if [[ ! -z "${CHALLENGES}" ]]; then
Expand Down