kubernikus icon indicating copy to clipboard operation
kubernikus copied to clipboard

Administrative API endpoint to list clusters of another project

Open stanislav-zaprudskiy opened this issue 2 years ago • 4 comments

As administrator, I'd like to have an API endpoint to list clusters of some other project in a region.

It would be something similar to /api/v1/clusters, but accepting OpenStack project id e.g. as path parameter /api/v1/{account}/clusters, and returning clusters of the project specified. Optionally, there could also be an endpoint returning all clusters in a region.

This might be useful when e.g. collecting resources of different projects using administrative user.

stanislav-zaprudskiy avatar Jun 26 '23 12:06 stanislav-zaprudskiy

Thanks for the feature request. I think we can implemented the suggested /api/v1/{account}/clusters API call with moderate effort. Is this enough for prodel or do you also need to be able to delete clusters with an admin scoped token? Because this is not possible with the current api. All modifying cluster apis require a project scoped token atm.

databus23 avatar Jun 27 '23 12:06 databus23

Is this enough for prodel or do you also need to be able to delete clusters with an admin scoped token? Because this is not possible with the current api. All modifying cluster apis require a project scoped token atm.

This would be enough. Deleting (or modifying) any resources using admin token is not currently planned.

stanislav-zaprudskiy avatar Jun 27 '23 13:06 stanislav-zaprudskiy

Ok great, so @jknipper if you could take a look at this it would be 💯

databus23 avatar Jun 27 '23 14:06 databus23

Optionally, there could also be an endpoint returning all clusters in a region

this would be very helpful. in additional it would be very useful if kubernikus can store the creator userid. I also don't see audit events related to kubernikus API, is it implemented?

kayrus avatar Nov 16 '23 09:11 kayrus