Config DB
ConfigDB component lookup enables you to query configs from the database to use as components.
kubernetes-cluster.yml
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: kubernetes-cluster
spec:
type: KubernetesCluster
icon: kubernetes
schedule: '@every 10m'
id:
javascript: properties.id
components:
- name: nodes
icon: server
type: KubernetesNode
lookup:
configDB:
- query: SELECT name, type FROM config_items WHERE type = 'Kubernetes::Node'
Field | Description | Scheme | Required |
---|---|---|---|
authentication | Username and password value, configMapKeyRef or SecretKeyRef for ConfigDB server | Authentication | |
display | Template to display query results in text (overrides default bar format for UI) | Template | |
host | Host is the server against which check needs to be executed | string | Yes |
labels | Labels for the check | Labels | |
query | Query that needs to be executed on the server | string | Yes |
transform | Template to transform results to | Template |
Results
The results
variable in the template will contain the following fields
Field | Description | Scheme |
---|---|---|
rows | stderr from the script | []map[string]any |
count | exit code of the script | int |