Skip to content

Add service for migrating a certificate cluster to the agent

What does this MR do and why?

Add service for migrating a certificate cluster to the agent

Adds a new service that will be used to perform the first step of migrating a certificate based Kubernetes cluster to use the GitLab agent. The service creates an agent, an agent token, and a migration tracking record. In the future, it will use the cluster and agent details to install the agent into the linked cluster.

Also included is a basic frontend and controller action, which serves as a starting point for frontend development.

Both the service and the frontend changes are controlled by the cluster_agent_migrations feature flag.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2025-02-04_at_10.12.16_am Screenshot_2025-02-04_at_10.12.43_am

How to set up and validate locally

This can't be tested fully as the form is only partially complete (there's no project selector yet, which is expected by the service), but the new tab/form can be viewed by doing the following:

  1. Enable the certificate based clusters feature flag: Feature.enable :certificate_based_clusters
  2. Enable the cluster agent migrations feature flag: Feature.enable :cluster_agent_migrations
  3. Go to Admin area -> Kubernetes -> Connect a cluster (deprecated), fill out the "name", "API URL" and "token" fields with dummy data, and submit the form.
  4. Go to the Migrate tab for the newly created cluster.

Related to #510703 (closed)

Edited by Tiger Watson

Merge request reports

Loading