kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.67k stars 333 forks source link

Add endpoint to retrieve resources by resourceIdentifier #12044

Open lahabana opened 1 week ago

lahabana commented 1 week ago

Description

We now have a systematic resourceIdentifier for everything.

There's a hash that should be computed from the resource Identifier. Is there a systematic way to compute the hash from a set of labels?

So could we have a new endpoint:

/meshes/<mesh>/<resourceType>/_resourceIdentifier/zones/<zoneName>/namespaces/<namespace>/name/<displayName>

These would always return the same as:

/meshes/<mesh>/<resourceType>/<hashedName>

This should be a MADR and this MADR should define:

This endpoint would enable the GUI to map from XDS config to resources and to hide altogether resourceNames to only rely on resourceIdentifier everywhere.

xref: https://github.com/kumahq/kuma-gui/issues/2848