Skip to content

Create new Token for the GitLab Kubernetes Agent

What does this MR do and why?

If a token has been compromised the project maintainers should be able to revoke the token and create a new token through the UI (this functionality is already available in the CLI).

This MR adds a possibility to create a new agent token from the UI.

The related designs are here. Note I didn't change the agent installation popup as part of this MR.

Screenshots or screen recordings

The flow:

Screen_Recording_2022-03-14_at_12.45.00

The agent's tokens list with the new button to Create token:

Screenshot_2022-03-14_at_12.44.14

The agent's tokens empty state with the new button to Create token:

Screenshot_2022-03-14_at_12.58.13

The create token modal:

Screenshot_2022-03-14_at_12.44.25

The install agent instructions:

Screenshot_2022-03-11_at_17.41.58

How to set up and validate locally

  1. Visit Infrastructure -> Kubernetes clusters and create an agent via Actions button.
  2. Click in the agent's name to get to the agent's details page.
  3. Select Tokens tab.
  4. Click the Create token button to create a new token.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #327152 (closed)

Edited by Anna Vovchenko

Merge request reports