Move Kubernetes from service to Cluster page
With 10.1 we have a CI/CD > Cluster page where we can create and see the Kubernetes cluster automatically created by the GKE integration.
We want to be able to specify manual parameters for an existing Kubernetes cluster, from the same page. This is exactly what we actually have in the Kubernetes integration page, so we can start by moving it in the Cluster page.
We want to move the existing Kubernetes integration page in the new CI/CD > Cluster page.
When creating a cluster, the Kubernetes integration parameters are automatically filled in, so they override the existing ones. If you then change them, "auto" cluster will no longer be connected with GitLab, so we should make it clear to the user.
Selecting a method
When a user (with Master permissions) first visits the Cluster integration page, they are asked how they would like to set up Cluster integration in their project.
Once the user chooses an option, the UI for the next step is loaded. As discussed with @filipa, it's better to do this inline, but it's okay to requiere a page redirect.
A dropdown at the top of the page still lets the user change the creation method
If the user has not logged in with Google yet, the current message is displayed instead of the form
If OAuth login has not been set up, we show the same message that we show in the current iteration
Once log in succeeds, we show the user the form asking for the GKE cluster details
|Sign in||GKE form|
Choosing existing cluster
If the user chooses to use an existing cluster, the current Kubernetes form is shown.
In this form, the confirmation button says
Add cluster instead of
Since we are adding more information and options to the view page, we need to be able to expand and collapse the different sections so the user is not overwhelmed. We can use the same model that we have for the Project Settings page.
The default state of this page is the same for GKE and existing clusters
Enable cluster integration section should not be collapsible, since it is important to be able to determine that information at a glance.
Applications section (to be introduced with #38464), will not be collapsible either because we want to promote usage of this new feature.
If a cluster is created on GKE, status banners need to be shown. Since the
GKE section is no longer first-level, we move the banners under the
Enable cluster integration section:
This section shows the details for the cluster and allows the user to change them.
If the cluster was created through GKE, the only editable field is
If the cluster was added manually, all fields are editable.
Token field should be masked for both forms.
|GKE cluster||Existing cluster|
The last section allows the user to remove cluster integration.
If the cluster was created on Google, there's also a sub-section with a link to GKE for managing the cluster.
|GKE cluster||Existing cluster|
Users without permissions
Users with permissions less than
Master simply do not see the
Cluster option in the navigation. If they navigate to one of the pages via URL they should see a
Links / references
- Monitoring of GKE cluster: #27890
What is it? Why should someone use this feature? What is the underlying (business) problem? How do you use this feature?
Who is this for? Provide one or more use cases.
Make sure these are completed before closing the issue, with a link to the relevant commit.