Skip to main content

Kubernetes

The Kubernetes component lookup fetches kubernetes resources to be used as components.

kube-check.yml
---
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: kubernetes-configs
spec:
type: Config
icon: kubernetes
schedule: '@every 30s'
components:
- name: configs
icon: server
type: ConfigMap
lookup:
kubernetes:
- kind: ConfigMap
display:
expr: |
dyn(results).map(c, {
'name': c.name,
'type': 'ConfigMap',
}).toJSON()
FieldDescriptionSchemeRequired
displayTemplate to display query results in text (overrides default bar format for UI)Template
ignoreIgnore the specified resources from the fetched resources. Can be a glob pattern.[]string
kindSpecifies the kind of Kubernetes object for interactionstringYes
labelsLabels for the checkstring
namespaceSpecifies namespace for Kubernetes objectResourceSelector
readyBoolean value of true or false to query and display resources based on availabilitybool
resourceQueries resources related to specified Kubernetes objectResourceSelector
transformTemplate to transform results toTemplate

ResourceSelector

FieldDescriptionSchemeRequired
nameName of Kubernetes resourcestring
labelSelectorSelect Kubernetes resource based on label. e.g. app, canary.string
fieldSelectorSelect Kubernetes resource based on the value of specified resource fieldstring

Results

The results variable in the template is itself a list of all the kubernetes resources.