cyclops icon indicating copy to clipboard operation
cyclops copied to clipboard

UI representation for `ClusterRoles`

Open petar-cvit opened this issue 1 year ago • 3 comments

Some K8s components are supported to have a custom UI component, and those can be found here. The scope of this issue is to support ClusterRoles. The new ClusterRole component should be similar to other components we already have, so feel free to check the existing ones out.

The visual representation should look something like this: image

You can fetch the data about a cluster role by calling the backend on

/api/resources?group=rbac.authorization.k8s.io&version=v1&kind=ClusterRole&name=&namespace=

You can test this using the k6-operator default template.

Refer to this PR on adding new UI components https://github.com/cyclops-ui/cyclops/pull/330

Issue similar to https://github.com/cyclops-ui/cyclops/issues/499

petar-cvit avatar Aug 16 '24 11:08 petar-cvit

Hi @petar-cvit, I’m encountering an issue where the API is returning null for my request. I’ve used the correct information from the resources listed at http://localhost:3000/api/modules/k6-operator/resources and formed the request URL as follows:

http://localhost:3000/api/resources?group=rbac.authorization.k8s.io&version=v1&kind=ClusterRole&name=k6-operator-manager-role&namespace=

Despite this, the response is still null. Could you help me troubleshoot this issue?

sarthakladhwe avatar Aug 16 '24 20:08 sarthakladhwe

Hey @sarthakladhwe, my bad. I mixed up which resources were supported on the backend. ClusterRoles are yet to be supported so this issue will have to wait until then

petar-cvit avatar Aug 16 '24 20:08 petar-cvit

No worries! Just let me know when it's supported, I'd be eager to tackle it. There’s a workaround by parsing manifest YAML into a JS object, but I believe our resources APIs are better suited for that.

sarthakladhwe avatar Aug 16 '24 21:08 sarthakladhwe

Closed by https://github.com/cyclops-ui/cyclops/pull/668

petar-cvit avatar Nov 20 '24 18:11 petar-cvit