diff --git a/acm/downstream_deploy_bundle_acm_operator.sh b/acm/downstream_deploy_bundle_acm_operator.sh index 118ef07..0f5ada5 100755 --- a/acm/downstream_deploy_bundle_acm_operator.sh +++ b/acm/downstream_deploy_bundle_acm_operator.sh @@ -58,11 +58,29 @@ function clean_acm_namespace_and_resources() { export TARGET_NAMESPACE="${ACM_NAMESPACE}" ${acm_uninstaller_file} || FAILURE "Uninstalling ACM Hub did not complete successfully" - ${OC} delete multiclusterhub --all || : - ${OC} delete subs --all || : - ${OC} delete clusterserviceversion --all || : - ${OC} delete validatingwebhookconfiguration multiclusterhub-operator-validating-webhook || : + BUG "ACM uninstaller script does not delete all resources" \ + "Delete ACM resources directly" \ + "https://github.com/open-cluster-management/deploy/issues/218" + # Workaround: + delete_crds_by_name "open-cluster-management" || : + + ${OC} delete submarinerconfig --all -n ${ACM_NAMESPACE} || : + ${OC} delete managedclusteraddons --all -n ${ACM_NAMESPACE} || : + ${OC} delete manifestwork --all -n ${ACM_NAMESPACE} || : + ${OC} delete managedcluster --all -n ${ACM_NAMESPACE} || : + ${OC} delete multiclusterhub --all -n ${ACM_NAMESPACE} || : + ${OC} delete subs --all -n ${ACM_NAMESPACE} || : + ${OC} delete clusterserviceversion --all -n ${ACM_NAMESPACE} || : + ${OC} delete validatingwebhookconfiguration --all -n ${ACM_NAMESPACE} || : + ${OC} delete multiclusterhub-operator-validating-webhook --all -n ${ACM_NAMESPACE} || : + + ${OC} delete replicaset --all -n ${ACM_NAMESPACE} || : + ${OC} delete ds --all -n ${ACM_NAMESPACE} || : + ${OC} delete cm --all -n ${ACM_NAMESPACE} || : + ${OC} delete deployment --all -n ${ACM_NAMESPACE} || : + ${OC} delete service --all -n ${ACM_NAMESPACE} || : + force_delete_namespace "${ACM_NAMESPACE}" 10m || : }