Namespace
Enterprise Edition RequiredThe 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.yamlapiVersion: 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]
Field | Description | Scheme | Required |
---|---|---|---|
checkName | Name for the check | string | Yes |
deadline | Overall time before which an HTTP connection to the pod must be established | int64 | |
deleteTimeout | int64 | ||
description | Description for the check | string | |
expectedContent | Expected content of an HTTP response from the created pod | string | |
expectedHttpStatuses | Expected HTTP status code of the response from the created pod | []int64 | |
httpRetryInterval | Interval in ms to retry HTTP connections to the created pod | int64 | |
httpTimeout | int64 | ||
icon | Icon for overwriting default icon on the dashboard | string | |
ingressHost | URL to be used by the ingress to expose the created pod | string | |
ingressName | Name to use for the ingress object that exposes the created pod | string | |
ingressTimeout | Maximum time to wait for an HTTP connection to the created pod | int64 | |
name | Name of the check | string | |
namespaceAnnotations | Metadata annotations to apply to created namespace | map[string]string | |
namespaceLabels | Metadata labels to apply to created namespace | map[string]string | |
namespaceNamePrefix | Prefix string to identity namespace | string | |
path | Path on which the created pod responds to requests | string | |
podSpec | Spec of pod to be created in check namespace | string | Yes |
port | Port on which the created pod serves traffic | int64 | |
priorityClass | Pod priority class | string | |
readyTimeout | Specify readiness timeout for namespace | int64 | |
scheduleTimeout | Maximum time between pod created and pod running | int64 | |
name | Name of the check, must be unique within the canary | string | Yes |
description | Description for the check | string | |
icon | Icon for overwriting default icon on the dashboard | string | |
labels | Labels for check | map[string]string | |
test | Evaluate whether a check is healthy | Expression | |
display | Expression to change the formatting of the display | Expression | |
transform | Transform data from a check into multiple individual checks | Expression | |
metrics | Metrics to export from | []Metrics |