headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

frontend: map: Add Custom Resources support

Open faebr opened this issue 6 months ago • 3 comments

This PR adds Custom Resources to the Map in the frontend.

Filter dropdown

Custom Resources are grouped by API group in the dropdown and can be individually selected:

Screenshot 2025-05-23 at 16 14 26

Edges

Edges between Custom Resources are shown for the Owner Reference in reverse order:

Screenshot 2025-05-23 at 16 21 36

Details View

The same details view as in the Custom Resources Section is also shown in the Map:

Screenshot 2025-05-23 at 16 22 55

Approach for adding Custom Resources

For now we have not squashed all the commits to show multiple ideas of how to add the CR details view. It was not clear for us which approach would be the best for this project, the latest one being the best integrated one from our point of view. Some changes were necessary since we dynamically load the CRD list, compared to the static approach of the base objects. If you think another approach would be better please let us know.

  • 4570773ea82fc353992c29eb243c1a13692baee4 shows the first implementation which manually adds the details section.
  • b7255fbaa10057d08f6db53f15197adc7f22950c uses the customResourceDefinition parameter in the KubeObjectDetails view.
  • a34d579ed6d31d0a4d81b3e8e9fad7223d29d869 simplifies the CustomResourceDefinition Class by using duck-typing for detecting the object type instead of using a marker.

faebr avatar May 23 '25 14:05 faebr

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: faebr / name: Fabian (0013d7843587359398e39aa28262aef5fe4c4d9b, 446942426a74e1014edee3163d5463b170a528d3, c68365485d85aed79085d3846bb37703de2910e8, 6256dde436624ae841bece09e506ded13dc0d296, 49e4efed8217284c0a90306091c352091498a31f)
  • :white_check_mark: login: VictorMarcolino / name: Victor Marcolino (ecdd0af58496bfceabb630f610a17ef0f8f4d9e9)
  • :white_check_mark: login: alexandernorth / name: Alexander North (2b63daf0e0418adbb63ea1aa9690998f054e7820)

Do you want to take a look @joaquimrocha ? I think it's good to merge as-is

sniok avatar Jun 12 '25 15:06 sniok

THank you @faebr and @sniok !

/lgtm /approve

joaquimrocha avatar Jun 23 '25 08:06 joaquimrocha

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: faebr, joaquimrocha, sniok

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [joaquimrocha,sniok]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Jun 23 '25 08:06 k8s-ci-robot