Skip to content

Add API Support for Kubernetes integration

What does this MR do?

Add Kubernetes Integration for the following endpoints:

GET :id/clusters # Returns project clusters
GET :id/clusters/:cluster_id # Returns specific cluster
POST :id/clusters/user # Add a cluster to the project. Same as "Add existing Cluster" from UI
PUT :id/clusters/:cluster_id # Update existing cluster
DELETE :id/clusters/:cluster_id # Removes cluster

EE counterpart: gitlab-ee!8994

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/40473

Does this MR meet the acceptance criteria?

Backend - To do

  • List all clusters
  • Get specific cluster
  • Add existing cluster
  • Update a cluster
  • Destroy a cluster
  • Manual QA

Manual QA

Manual QA was done using an EE environment

GET :id/clusters - Returns project clusters

With developer & maintainer access
index

GET :id/clusters/:cluster_id - Returns specific cluster

With developer & maintainer access
GET

POST :id/clusters/user - Add a cluster to the project. Same as "Add existing Cluster" from UI

With valid params With invalid params
POST_valid POST_invalid

PUT :id/clusters/:cluster_id - Update existing cluster

With user cluster With gcp cluster
PUT_USEr PUT_GCP

DELETE :id/clusters/:cluster_id - Removes cluster

With existing cluster With unknown cluster
DELETE DELETE_unknown
Edited by 🤖 GitLab Bot 🤖

Merge request reports