Skip to content

Commit c525edb

Browse files
Ensure Route53 cleanup happens even with openshift-install destroy
Route53 DNS records are sometimes left behind by openshift-install destroy. This change ensures we always clean up Route53 records, even when openshift-install succeeds, to prevent DNS pollution.
1 parent e3ce49e commit c525edb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/destroy-openshift-cluster.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,11 @@ execute_destruction() {
17731773
if [[ "$use_openshift_install" != "true" ]]; then
17741774
log_info "Running comprehensive AWS resource cleanup..."
17751775
destroy_aws_resources "$infra_id"
1776+
else
1777+
# Even with successful openshift-install, we need to clean up Route53
1778+
# as openshift-install sometimes leaves DNS records behind
1779+
log_info "Cleaning up Route53 records (post openshift-install)..."
1780+
cleanup_route53_records "$infra_id"
17761781
fi
17771782

17781783
# Clean up S3 state

0 commit comments

Comments
 (0)