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()
Field | Description | Scheme | Required |
---|---|---|---|
display | Template to display query results in text (overrides default bar format for UI) | Template | |
ignore | Ignore the specified resources from the fetched resources. Can be a glob pattern. | []string | |
kind | Specifies the kind of Kubernetes object for interaction | string | Yes |
labels | Labels for the check | string | |
namespace | Specifies namespace for Kubernetes object | ResourceSelector | |
ready | Boolean value of true or false to query and display resources based on availability | bool | |
resource | Queries resources related to specified Kubernetes object | ResourceSelector | |
transform | Template to transform results to | Template |
ResourceSelector
Field | Description | Scheme | Required |
---|---|---|---|
name | Name of Kubernetes resource | string | |
labelSelector | Select Kubernetes resource based on label. e.g. app, canary. | string | |
fieldSelector | Select Kubernetes resource based on the value of specified resource field | string |
Results
The results
variable in the template is itself a list of all the kubernetes resources.