Beautify The Topology View
Last updated
Last updated
Until now you've deployed most of microservices except the Statustics and its UI services. By the way, the interesting lab was deploying the Fight microservice that at the end you can see the visual connectors (arrow lines) in the Topoligy view. That's cool, isn't it?
The visual connectors don't represent actual network connections among services nor impact the services communication neither when we add connectors to or remove them from the entities.
The visual connectors just provide better understanding of application overview architecture and relationship of services in the application. Technically, it's just app.openshift.io/connects-to
annotation elements. See for more details about annotations.
However, in Topology view right now, the diagram is not yet completed and we can make it looks better. Let's do it!
Open Web Terminal then run following command:
You should see the visual connectors from rest-heroes to heroes-db, and rest-vllains to villains-db.
Similar to the annotations, label can also be added to workload to provide some metadata for the workload. OpenShift web console read app.openshift.io/runtime
label value to determine what icon should be display for a particular entity in topology view. Let' change the icon of Villain service to display the correct icon.
Open Web Terminal then run following command:
You should see the icon of rest-villians entity get changed from Java mascot (Duke) to Quarkus icon.
How to add annotation to workload using oc annotation
command.
How to add visual connector to workload with the app.openshift.io/connects-to
annotation.
How to label workload using oc
command.
How to change entity icon in topology view with app.openshift.io/runtime
label.