Skip to content

Conversation

ricoberger
Copy link
Member

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.

@ricoberger ricoberger linked an issue Dec 30, 2021 that may be closed by this pull request
3 tasks
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.
@ricoberger ricoberger force-pushed the applications-improve-topology-chart branch from 3042826 to 121cf41 Compare December 30, 2021 20:35
@codecov-commenter
Copy link

Codecov Report

Merging #269 (121cf41) into main (96a8567) will increase coverage by 0.31%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
+ Coverage   34.99%   35.30%   +0.31%     
==========================================
  Files          90       90              
  Lines        7613     7650      +37     
==========================================
+ Hits         2664     2701      +37     
  Misses       4913     4913              
  Partials       36       36              
Impacted Files Coverage Δ
pkg/api/clusters/cluster/cluster.go 37.03% <100.00%> (+0.84%) ⬆️
plugins/applications/applications.go 100.00% <100.00%> (ø)
plugins/applications/pkg/topology/topology.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96a8567...121cf41. Read the comment docs.

@ricoberger ricoberger merged commit 1b92bc3 into main Dec 30, 2021
@ricoberger ricoberger deleted the applications-improve-topology-chart branch December 30, 2021 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[applications] Improve applications functionality

2 participants