envoyproxy / envoy-tools

Companion tooling for Envoy proxy
Apache License 2.0
49 stars 24 forks source link

csdsclient: add visualization #15

Closed Rainton closed 4 years ago

Rainton commented 4 years ago

This PR includes adding flag -visualization to show the relationship between xDS in the config in response.

Details:

Signed-off-by: Yutong Li yutongli@google.com /cc @fuqianggao @alexburnos

Rainton commented 4 years ago

/cc @htuch @dschaller

fuqianggao commented 4 years ago

/cc @dio @therealmitchconnors

therealmitchconnors commented 4 years ago

I really like this feature. I'm a little unclear on the details though. What questions is the visualization intended to solve? Can you describe the rules used to build the graphviz markup? Does color represent sync status? perhaps a key section would be useful...

Rainton commented 4 years ago

@therealmitchconnors Sorry for my unclear expression.

The detailed config in response is always so long that users cannot figure out the relationships between each xDS easily. The visualization feature is used to give users a clear view of the relationships by going through the detailed config, storing relationships between xDS in maps, drawing a graph by marking xDS as nodes and relationships as edges. Different colors represent different xDS types, such as LDS, RDS, CDS, and EDS.

Maybe you can take a look at this sample graph to get clearer to what this feature would be like.

The user scenario may be like this: the user sees the graph and finds that there are two RDSs here and both of them are related to the CDS0. If the user want to see the detailed config of one of the RDS, he can just hovers the mouse over the specific RDS node and its real name will shows. Then the user can find the config of this RDS easily by searching this real name in the detailed config.

dio commented 4 years ago

Seems like you need to merge master.

Rainton commented 4 years ago

@dio Sorry about that. I've just merged.