Story (Required)
We need to define in cluster claim specification the lifetime field. This provides us with the flexibility to choose the cluster lifetime.
Background (Required)
Now there are two approaches how to uninstall clusters: manual or using cronjob.
Using the OpenShift Hive as a cluster installer brings us option to automate uninstallation process of Hive clusters.
Approach (Required)
This can be achieved by using the new the parameter "CLUSTER_LIFETIME" in acceptance-tests task.
- Add liftetime spec to the cluster claim template , where the value will be the value of the "CLUSTER_LIFTETIME" parameter.
- Change the existing approach of creating cluster secrets. Set the label "keep-cluster=true" when the parameter "CLUSTER_LIFETIME" is not empty and OpenShift Hive is used as the installer of cluster.
- Modify the install-cluster and acceptance-tests pipelines.
- Modify pipeline runs that might be using Hive as a cluster installer.