Skip to content

hcm: Add metadata specific the routed cluster in weighted_clusters. #2851

@yuval-k

Description

@yuval-k

Description:

Right now when a route points to multiple clusters, we don't have a good way of inferring metadata
information specific to the routed cluster. more specifically when multiple clusters are in the route.

In solo.io we to get more info on the cluster chosen for routing, for example, in our transformation filter. we attach the transformation to perform to the route metadata.

To overcome that, in the route metadata we have a struct with an entry per potential cluster. This is
limited, as we can only have one cluster in the struct (it doesn't cover the case of traffic splitting to test a new transformation)

Desired Behavior:
Ideally one would to be able to have the transformation attached on the routed
cluster and be able to place the same cluster more than once in the list of weighted clusters (with different
metadata).

The most straight forward idea that comes to mind is to add a metadata field to
route.WeightedCluster.ClusterWeight, and expose it in the RouteEntry that the filter accesses.

We (the team at solo.io) can help with the implementation and submit a PR once we discuss and finalize the details.

Relevant Links:
https://github.com/solo-io/envoy-transformation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests. Not bugs or questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions