There is a need for an improvement in the RHDH operator installation script to streamline the testing process by ensuring a clean installation of the catalog each time the script is executed.
Problem Statement:
The current installation script does not handle existing resources (CatalogSource, Subscription, OperatorGroup) when re-run, leading to potential conflicts and issues during re-installation of the RHDH operator catalog. This makes testing more difficult, as the resources need to be manually deleted each time before the script is executed.
Proposed Solution:
Improve the installation script by adding a delete_existing_resources function that:
- Checks if the CatalogSource, Subscription, and OperatorGroup already exist.
- Deletes them if they are present.
- Proceeds with the installation of a new catalog and operator subscription.
This enhancement will ensure that a fresh installation is done every time, facilitating the testing of new catalog images and making it easier for the QE team to validate both the latest RC and CI builds.
Steps to Implement:
- Add a delete_existing_resources function to check and delete the existing CatalogSource, Subscription, and OperatorGroup.
- Ensure that this function is called before installing the new catalog to guarantee a clean state for every installation.
Benefits:
- Simplifies the testing process for the QE team.
- Ensures that the operator is always installed from a fresh catalog without conflicts from previous installations.
- Saves time by automating the cleanup of old resources before a new installation.