Skip to content

Draft: Fetch and render Kubernetes resources in Environment index page - Overview [Don't merge]

What does this MR do and why?

This MR should not be merged. Its aim is to show an overview of the Kubernetes integration for the environments page feature.
The work to deliver this feature will be split into multiple MRs:

  • Show the Kubernetes integration section with the agent information - !113973 (merged)
  • Fetch and show the list of all running pods and their statuses (static); introduce cluster-client library and agent connection - !115225 (merged)
  • Fetch and show the list of all cluster's services (static) - !117879 (merged)
  • Fetch and show the list of all cluster's workload types (static) - !118498 (merged)
  • Calculate the environment's health (static) - !122188 (merged)
  • Update fetching resources to use labels filtering (static)
  • Change the API to work with the streaming events and Watch API
  • Add environments info tab.

Screenshots or screen recordings

Screenshot_2023-03-07_at_22.46.20

Screenshot_2023-03-07_at_22.46.35

Screenshot_2023-03-07_at_22.46.46

How to set up and validate locally

You'll need to prepare a setup to validate the feature

  1. Enable KAS for your GDK following the guide. Please follow points 1-8 and then the (Optional) Deploy the GitLab Agent (agentk) with k3d section.
  2. Visit the Project -> Infrastructure -> Kubernetes clusters page and create an agent following the instruction from the modal.
  3. Make sure the agent has a config file containing the following instructions:
    user_access:
       access_as: 
         agent: {}
       projects:
         - id: <environment-group/cluster-administration>your-group-id>
  4. Install your agent in the k3d cluster (this guide should help)
  5. Navigate to the agent page via Project -> Infrastructure -> Kubernetes clusters -> . This step is needed to obtain a cookie for the agent access.
  6. Create an environment in your project.
  7. Note that some of the backend isn't ready yet: in order to see the changes, please uncomment the mock agent data in the agent computed of new_environment_item.vue and change it to the relevant data for your created agent.

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 #390769 (closed)

Edited by Anna Vovchenko

Merge request reports