Skip to content

Adds Clusters::Cluster#cleanup_status state machine

What does this MR do?

This MR is part of the implementation that we're splitting from this MR which got too big: !16954 (merged)

This part of the code creates a state machine that will control the workflow of removing a cluster and its resources.

Clusters::Cluster#start_cleanup! will transition the state machine and trigger a worker to start cleaning the cluster. This worker will then uninstall all cluster applications then call Clusters::Cluster#continue_cleanup! to transition the state machine and call the worker to remove the project namespaces. Then the latter, after deleting the namespaces, will also call Clusters::Cluster#continue_cleanup! to call the last worker in the chain which will delete the service account and the cluster itself.

The workers implementation will happen on !16954 (merged), here is only the state machine.

Part of #26815 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports