cyclops icon indicating copy to clipboard operation
cyclops copied to clipboard

ClusterRole Backend Implementation

Open KaradzaJuraj opened this issue 7 months ago • 3 comments

When fetching resources for a Module, some resources are supported to return details about a specific resource. For example, the endpoint for Deployments will return more information about pods and their statuses, and the endpoint for Services will return information about the ports.

If you want to fetch information about a Deployment from the default namespace called demo-app you would call:

/resources?group=apps&version=v1&kind=Deployment&name=demo-app&namespace=default

The goal of the issue is to support ClusterRole on the same endpoint. The endpoint for fetching ClusterRole data would look like this:

 /resources?group=apps&version=v1&kind=ClusterRole&name=&namespace=

The handler function for the endpoint is here, and you will have to handle a new type here.

The endpoint should return data about its name, rules, resources, verbs… (you can find more about it here

Refer to this PR on adding new types https://github.com/cyclops-ui/cyclops/pull/259

KaradzaJuraj avatar Jul 16 '24 18:07 KaradzaJuraj