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.
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: namespace-check
spec:
interval: 30
namespace:
- name: namespace check
namespaceNamePrefix: "test-foo-"
podSpec: |
apiVersion: v1
kind: Pod
metadata:
name: test-namespace
namespace: default
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: 15000
deleteTimeout: 12000
ingressTimeout: 20000
deadline: 29000
httpRetryInterval: 200
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 will expose 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 will respond to requestsstring
podSpecSpec of pod to be created in check namespacestringYes
portPort on which the created pod will serve 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