K8s Tree View: Migrate existing view to a new backend

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Migrate the existing Tree view on the frontend to using the new /graph API.

The request should look like this:

{
  "namespace": "myns",
  "roots": {
    "individual": [
      {
        "group": "helm.toolkit.fluxcd.io",
        "resource": "helmrelease",
        "name": "redis"
      }
    ]
  },
  "match": [
    {
      "includeGroupVersionResource": {
        "group": "apps",
        "version": "v1",
        "resource": "deployments"
      }
    },
    {
      "includeGroupVersionResource": {
        "group": "api",
        "version": "v1",
        "resource": "pods"
      }
    },
    {
      "includeGroupVersionResource": {
        "group": "api",
        "version": "v1",
        "resource": "services"
      }
    },
    {
      "includeGroupVersionResource": {
        "group": "api",
        "version": "v1",
        "resource": "secrets"
      }
    },
    {
      "includeGroupVersionResource": {
        "group": "api",
        "version": "v1",
        "resource": "configmap"
      }
    }
  ]
}

Implementation plan

  1. Create a new component in the Kubernetes resolvers related to the Tree View.
  2. Use the cluster client APIs added in gitlab-org/cluster-integration/javascript-client#17
  3. Create a corresponding graphql query
  4. For the first iteration, reuse the existing UI.
Edited by 🤖 GitLab Bot 🤖