Skip to main content

Namespace

The Namespace check:

  • Creates a new namespace using the labels/annotations provided
  • Create a new pod in the namespace using the provided PodSpec
  • Expose the pod using the provided ingress URL
  • Test an HTTP connection to the pod.
namespace-check.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: namespace-pass
spec:
schedule: "@every 5m"
namespace:
- name: check
namespaceNamePrefix: "test-foo-"
podSpec: |
apiVersion: v1
kind: Pod
metadata:
name: test-namespace
labels:
app: hello-world-golang
spec:
containers:
- name: hello
image: quay.io/toni0/hello-webserver-golang:latest
port: 8080
path: /foo/bar
ingressName: test-namespace-pod
ingressHost: "test-namespace-pod.127.0.0.1.nip.io"
readyTimeout: 5000
httpTimeout: 40000
deleteTimeout: 12000
ingressTimeout: 40000
deadline: 60000
httpRetryInterval: 1500
expectedContent: bar
expectedHttpStatuses: [200, 201, 202]
FieldDescriptionSchemeRequired
checkNameName for the checkstringYes
deadlineOverall time before which an HTTP connection to the pod must be establishedint64
deleteTimeoutint64
descriptionDescription for the checkstring
expectedContentExpected content of an HTTP response from the created podstring
expectedHttpStatusesExpected HTTP status code of the response from the created pod[]int64
httpRetryIntervalInterval in ms to retry HTTP connections to the created podint64
httpTimeoutint64
iconIcon for overwriting default icon on the dashboardstring
ingressHostURL to be used by the ingress to expose the created podstring
ingressNameName to use for the ingress object that exposes the created podstring
ingressTimeoutMaximum time to wait for an HTTP connection to the created podint64
nameName of the checkstring
namespaceAnnotationsMetadata annotations to apply to created namespacemap[string]string
namespaceLabelsMetadata labels to apply to created namespacemap[string]string
namespaceNamePrefixPrefix string to identity namespacestring
pathPath on which the created pod responds to requestsstring
podSpecSpec of pod to be created in check namespacestringYes
portPort on which the created pod serves trafficint64
priorityClassPod priority classstring
readyTimeoutSpecify readiness timeout for namespaceint64
scheduleTimeoutMaximum time between pod created and pod runningint64
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