Skip to content

Commit

Permalink
Workaround for: stolostron/deploy#218
Browse files Browse the repository at this point in the history
Signed-off-by: nmanos <[email protected]>
  • Loading branch information
manosnoam committed Nov 3, 2021
1 parent d5ebd0a commit 13f8e33
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions acm/downstream_deploy_bundle_acm_operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,30 @@ 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" || :
force_delete_namespace "${ACM_NAMESPACE}" 10m || :

${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 || :

}

Expand Down

0 comments on commit 13f8e33

Please sign in to comment.