[applications] Improve topology graph #269
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is now possible to apply custom styles in the topology graph. For
this we added a new configuration option for the applications plugin
named "topology". The "topology" configuration allows users to specify
custom node types for the topology graph. For each node type the user
must provide a "type", "shape" and "color".
In the Application CRD we also added a new field "topology", where the
subfield "type" can be used to select the node type for the application
from the configuration.
The "dependencies" field is now part of the "topology" field in the
Applications CRD, which breaks compatibility with the former CRD for
applications.
The new styling works as follows: When a user sets a "topology.type" in
the Application we use the corresponding node type from the applications
plugin configuration to set the shape and color for the application in
the topology graph. When an application is shown in the graph which is
not within the selected namespaces or tags we also apply an opacity of
25%, to mark the application as "not selected". This is done by adding
another node type for each user specified node type with the
"-not-selected" suffix. When an application doesn't contain the
"topology.type" field we use the default node type "application".
To improve the applications plugin configuration we added also a new
field "cache" under which the cache duration for the topology, teams and
tags can be set. This is also an breaking change with the former plugin
configuration.