Skip to content

Add connectivity status to Kubernetes Agents listing

Anna Vovchenko requested to merge 323058-connectivity-status-of-the-agent into master

What does this MR do?

This MR adds two columns to the GitLab Kubernetes Agent table:

  1. Connection status
  2. Last contact date

Both values are processing from the most recent token last connection date (based on lastUsedAt field of the clusterAgents -> tokens). There are 3 options for the status:

  • unused in case no token was connected
  • inactive in case the token last connection time is more than 8 minutes ago
  • active in case the token last connection time is less than 8 minutes ago

There's a tooltip showing the last connection relative time for the active status. There's a popover with some troubleshooting information for other statuses.

Last contact date shows the relative date of the last connection and has a tooltip with the absolute date.

Screenshots or Screencasts (strongly suggested)

The new columns in the table

Screenshot_2021-09-14_at_17.31.34

The popover for the unused state

Screenshot_2021-09-14_at_17.31.59

The popover for the inactive state

Screenshot_2021-09-14_at_17.32.11

The tooltip for the active state

Screenshot_2021-09-14_at_17.32.33

The tooltip for the connection date

Screenshot_2021-09-14_at_17.32.51

How to setup and validate locally (strongly suggested)

  1. Follow the documentation guide and add the GitLab Kubernetes Agent from the UI on Infrastructure -> Kubernetes Clusters -> GitLab Agent managed clusters page
  2. To create an agent in the unused state don't use the generated token
  3. To create an agent in the active state follow the documentation.
  4. To create an agent in the inactive state you can install the Agent into the cluster and then delete it using kubectl delete -n gitlab-kubernetes-agent -f ./resources.yml command

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #323058 (closed)

Edited by Anna Vovchenko

Merge request reports