Topology
This page defines the specification for Topology. There are few samples in the examples section.
Field | Description | Scheme | Required |
---|---|---|---|
id | Specify unique ID for topology | IDSelector | |
components | Specify the topology fields for your service, application, check, etc. | []Component | |
configs | Specify selectors for config items that should be related with this topology. | []ConfigSelector | |
groupBy | Specify the catalog tag (& optionally the tag selector) to group the topology. | []GroupBy | |
icon | Set an icon class for topology. | Icon | |
owner | Specify owner for the topology. | string | |
properties | Customize topology properties as to be visualized on Mission control UI. | []Property | |
schedule | Set schedule to update topology at the set interval. | string | |
text | Set description or text of choice pertaining to topology. | string | |
tooltip | Set tooltip outlining information pertaining to the topology. | string | |
type | Set type of topology e.g. service, API, website, library, database, etc. | string |
ID Selector
Field | Description | Scheme |
---|---|---|
expr | ||
javascript | ||
template |
You must specify one of
expr
,javascript
ortemplate
Group By
A single topology definition can generate multiple distinct topologies by grouping the resources based on a config tag.
Grouping by tags provides a convenient way to manage and organize your topologies based on logical boundaries or dimensions, such as environment, region, or cluster.
For example, if you have configs scraped from three different clusters (aws, azure, gcp), grouping the topology by the cluster
tag will generate three separate topologies,
one for each cluster tag value (aws, azure, gcp).
This allows you to define a single topology that can automatically generate multiple topologies & stay up-to-date and aligned as your infrastructure grows and new clusters or environments are added without having to ever update the topology.
It is important to understand that group by tag works only when a toplogy is built from catalog & config lookups/selectors.
Config tags are crucial to the functioning of grouping.
Field | Description | Scheme |
---|---|---|
tag* | The tag to group by. |
|
selector | Narrow down the tags. |
---
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: kubernetes-clusters
spec:
icon: flux
type: Topology
schedule: "@every 5m"
groupBy:
tag: cluster
components:
- icon: nodes
name: Nodes
components:
- name: Nodes Component
type: lookup
lookup:
catalog:
- name: ""
test: {}
display:
expr: >
dyn(results).map(r, {
'name': r.name,
'icon': 'node',
'status': r.status,
'status_reason': r.description,
'selectors': [{'labelSelector': 'app.kubernetes.io/instance='+r.name}],
}).toJSON()
selector:
- types:
- Kubernetes::Node