Migrate managed clusters that aren't using managed features to unmanaged
Problem to solve
There are project level clusters that were created before #56557 (closed) that GitLab considers managed, but are actually being managed by users. This means we cannot enable just-in-time resource creation for these clusters, as deployment jobs for these projects would fail when GitLab tries to create the "managed" resources. If these clusters are set to unmanaged, we can enable just-in-time resource creation for all clusters, and remove legacy logic that creates resources as soon as a cluster is added to a project.
Proposal
Find all clusters that are mistakenly marked as managed, and set them to unmanaged.
Possible strategies for finding relevant clusters:
-
All managed, project-level clusters that
have a successful deployment, anddo not have akubernetes_namespace
record persisted for the project. -
?
Caveats
Unless we can be 100% accurate with our migration, we will need to implement https://gitlab.com/gitlab-org/gitlab-ce/issues/60617 first, so that users can make this change themselves.
What does success look like, and how can we measure that?
just-in-time resource creation is enabled for all clusters.