-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKubeDiagrams.yaml
44 lines (44 loc) · 1.71 KB
/
KubeDiagrams.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Configuration of kube-diagrams
# no specific clusters
nodes:
# Prometheus resources
Alertmanager/monitoring.coreos.com/v1:
scope: Namespaced
custom_icon: icons/Alertmanager.png
edges: |
edges.add_service_account("spec.serviceAccountName")
#TODO: spec.alertmanagerConfigSelector
#TODO: spec.alertmanagerConfigNamespaceSelector
Prometheus/monitoring.coreos.com/v1:
scope: Namespaced
custom_icon: icons/Prometheus.png
edges: |
edges.add_service_account("spec.serviceAccountName")
for alertManager in query_path(resource, "spec.alerting.alertmanagers", []):
edges.append([
"%s/%s/Alertmanager/monitoring.coreos.com/v1" % (
alertManager["name"],
alertManager["namespace"]
),
"REFERENCE"
])
edges.add_all_resources_matching_labels("ServiceMonitor", "spec.serviceMonitorSelector.matchLabels")
#TODO: spec.serviceMonitorNamespaceSelector
#TODO: spec.podMonitorSelector
#TODO: spec.podMonitorNamespaceSelector
#TODO: spec.probeSelector
#TODO: spec.probeNamespaceSelector
#TODO: spec.ruleNamespaceSelector
edges.add_all_resources_matching_labels("PrometheusRule", "spec.ruleSelector.matchLabels")
#TODO: spec.scrapeConfigSelector
#TODO: spec.scrapeConfigNamespaceSelector
PrometheusRule/monitoring.coreos.com/v1:
scope: Namespaced
custom_icon: icons/PrometheusRule.png
# no edges
ServiceMonitor/monitoring.coreos.com/v1:
scope: Namespaced
custom_icon: icons/ServiceMonitor.png
edges: |
edges.add_all_resources_matching_labels("Service", "spec.selector.matchLabels")
#TODO: spec.namespaceSelector