-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yaml
90 lines (90 loc) · 3.28 KB
/
config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
resources:
- kind: v1/namespaces
selector:
query: .metadata.name | contains("kube-system")
port:
entity:
mappings:
- identifier: '"dot"'
title: '"dot"'
blueprint: '"cluster"'
- kind: v1/namespaces
selector:
query: .metadata.name | startswith("environment")
port:
entity:
mappings:
- identifier: .metadata.name + "-" + "dot"
title: .metadata.labels.environment
blueprint: '"environment"'
relations:
cluster: '"dot"'
- kind: v1/namespaces
selector:
query: .metadata.name | startswith("kube") | not
port:
entity:
mappings:
- identifier: .metadata.name + "-" + "dot"
title: .metadata.name
blueprint: '"namespace"'
properties:
creationTimestamp: .metadata.creationTimestamp
labels: .metadata.labels
relations:
Cluster: '"dot"'
- kind: apps/v1/deployments
selector:
query: .metadata.labels.type == "backend"
port:
entity:
mappings:
- identifier: .metadata.name + "-Deployment-" + .metadata.namespace + "-" + "dot"
title: .metadata.name
icon: '"Deployment"'
blueprint: '"backend-app"'
properties:
availableReplicas: .status.availableReplicas
labels: .metadata.labels
containers: (.spec.template.spec.containers | map({image}))
isHealthy: if .spec.replicas == .status.availableReplicas then "Healthy" else "Unhealthy" end
url: '"https://github.com/" + .metadata.labels.gitHubOrg + "/" + .metadata.labels.gitHubRepo'
language: .metadata.labels.language
on-call: .metadata.annotations.onCall
relations:
environment: .metadata.namespace + "-" + "dot"
- kind: v1/nodes
port:
entity:
mappings:
- identifier: (.metadata.name) | (split(".")|join("_")) + "-" + "dot"
title: .metadata.name + "-" + "dot"
icon: '"Node"'
blueprint: '"node"'
properties:
creationTimestamp: .metadata.creationTimestamp
totalCPU: .status.allocatable.cpu
totalMemory: .status.allocatable.memory
labels: .metadata.labels
kubeletVersion: .status.nodeInfo.kubeletVersion | split("-") | .[0]
ready: .status.conditions[] | select(.type == "Ready") | .status
relations:
Cluster: '"dot"'
- kind: v1/pods
selector:
query: .metadata.namespace | startswith("kube") | not
port:
entity:
mappings:
- identifier: .metadata.name + "-" + .metadata.namespace + "-" + "dot"
title: .metadata.name
icon: '"Microservices"'
blueprint: '"pod"'
properties:
startTime: .status.startTime
phase: .status.phase
labels: .metadata.labels
containers: (.spec.containers | map({image, resources})) + .status.containerStatuses | group_by(.image) | map(add)
conditions: .status.conditions
relations:
Node: (.spec.nodeName) | (split(".")|join("_")) + "-" + "dot"