stolostron / deploy

Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Apache License 2.0
158 stars 153 forks source link

uninstall.sh: Validate MultiClusterHub is deleted before continuing #254

Open michaelkotelnikov opened 2 years ago

michaelkotelnikov commented 2 years ago

Signed-off-by: michaelkot97 michael.kot97@gmail.com

Description of the change: Added a check that verifies the deletion of the MultiClusterHub resource before continuing with CRD and operator deletion in the uninstall.sh script.

Motivation for the change: The existence of some resources does not allow the deletion of the MultiClusterHub resource (e.g - MultiClusterObservability). When such resources exist, the script fails to delete the MultiClusterHub CR, but continues to delete its CRD. In such cases the uninstall process is not successful and leaves a corrupted instance of a MultiClusterHub. The next stages of the script should only run when the MultiClusterHub instance is really deleted.

openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: michaelkotelnikov To complete the pull request process, please assign gurnben after the PR has been reviewed. You can assign the PR to them by writing /assign @gurnben in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/stolostron/deploy/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment