openshift-topology-exporter
Simple tool to export the topology configuration and visualize it in GraphViz or other managed diagram visualizers.
Resources exported and connected in the diagrams are:
This tool is based on the OpenShift Client in Go and requires Golang.
Options
The runtime configuration is defined in config.yaml:
Option |
Description |
Default |
formatterclass |
One of mermaid , graphviz |
graphviz |
loglevel |
Console logging level |
info |
logfile |
Name of log file (with debug level) |
exporter.log |
knative |
To enable the exploration of the Knative resources |
true |
namespaces |
List of namespaces to explore |
`` |
Instructions
Note: You must be logged in to the OpenShift console to successfully run the tool
Configure the target namespaces in config.yaml, then run as:
go run exporter.go
Install Graphviz and visualize it as:
dot -Tpng diagram.dot > diagram.png
The resulting diagram is in the generated diagram.png
image file.
An example diagram is given, captured from a real deployment of the Red Hat Single Sign-On.
In alternative, you can paste the content of the generated diagram.dot
file in an online visualizer like https://dreampuf.github.io/GraphvizOnline and enjoy the result.
You can configure a different formatterclass
in config.yaml, these are the supported values: