Skip to main content

Pod

The Pod check creates a new pod and verifies its reachability.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: pod-check
spec:
interval: 30
pod:
- name: golang
spec: |
apiVersion: v1
kind: Pod
metadata:
name: hello-world-golang
namespace: default
labels:
app: hello-world-golang
spec:
containers:
- name: hello
image: quay.io/toni0/hello-webserver-golang:latest
port: 8080
path: /foo/bar
scheduleTimeout: 20000
readyTimeout: 10000
httpTimeout: 7000
deleteTimeout: 12000
ingressTimeout: 10000
deadline: 60000
httpRetryInterval: 200
expectedContent: bar
expectedHttpStatuses: [200, 201, 202]

FieldDescriptionSchemeRequired
namespaceNamespace to create the pod instringYes
specSpec of pod to be createdstringYes
scheduleTimeoutMaximum time between pod created and pod runningint64
readyTimeoutint64
httpTimeoutMaximum time to wait for an HTTP connection to the created podint64
deleteTimeoutSpecify timeout for pod deletionint64
ingressTimeoutMaximum time to create an ingress connected to the podint64
httpRetryIntervalInterval in ms to retry HTTP connections to the created podint64
deadlineOverall time before which an HTTP connection to the pod must be establishedint64
portPort on which the created pod will serve trafficint64
pathPath on which the created pod will respond to requestsstring
ingressNameName to use for the ingress object that will expose the created podstringYes
ingressHostURL to be used by the ingress to expose the created podstring
expectedContentExpected content of an HTTP response from the created podstring
expectedHttpStatusesExpected HTTP status code of the response from the created pod[]int64
priorityClassPod priority classstring
nameName of the check, must be unique within the canarystringYes
descriptionDescription for the checkstring
iconIcon for overwriting default icon on the dashboardstring
labelsLabels for checkmap[string]string
testEvaluate whether a check is healthyExpression
displayExpression to change the formatting of the displayExpression
transformTransform data from a check into multiple individual checksExpression
metricsMetrics to export from[]Metrics

Metrics

Metric
canary_check_histogram{metric = "creation_time"}HistogramTime for pod to be Pending
canary_check_histogram{metric = "delete_time"}HistogramTime to delete pod
canary_check_histogram{metric = "ingress_time"}HistogramTime until ingress is returning requests
canary_check_histogram{metric = "request_time"}HistogramDuration of http request once ingress is up
canary_check_histogram{metric = "schedule_time"} HistogramTime for pod to be Running