Skip to content

Fetch available parameters directly from GKE when creating a cluster

Owners

UX: @tauriedavis FE: @dennistang BE: @matteeyah

Description

When creating a cluster (https://gitlab.com/gitlab-org/gitlab-ce/issues/35954), you are asked for some parameters to choose different options (cluster size, project, etc...), and now they are inputboxes that you have to fill by yourself, figuring out which are the allowed values.

Since many of these parameters are exposed by GKE (someone only after authentication), it is a good help fetching and prefilling dropdowns with the list of the existing values, so users can simply select the intended one from the list.

Proposal

Automatically get via GCP API the following parameters and fill the possible values of the dropdowns instead of inputboxes:

  • Google Cloud Platform project ID
  • Zone
  • Machine type

Parameters should be fetched as soon as possible and loaded asynchronously, to allow selection in the form. If the flow doesn't work because it is not real-time, we should still allow specifying params manually and autocomplete with possible values of the dropdown if available.

Design

Projects are fetched in real time. The user does not need to refresh in order to see any new projects added. We show a loading icon while we fetch projects. If we run into an error while fetching, we fall back to the normal input that we have today. If we detect that the user has no projects, we inform them to create one.

gcp__cluster--fetch-params

Using pre-defined lists for zone and machine type, we default a value. Users can change this value or add a new one.

Example:

Screen_Shot_2018-03-21_at_12.14.55_PM

Screen_Shot_2018-03-21_at_12.15.07_PM

Edited by Kamil Trzciński