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 <nmanos@redhat.com>
  • Loading branch information
manosnoam committed Nov 3, 2021
1 parent d5ebd0a commit 9c269de
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions acm/downstream_deploy_bundle_acm_operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 || :

}
Expand Down

0 comments on commit 9c269de

Please sign in to comment.