Exec
Standard Edition RequiredExecutes a bash (linux) or powershell (windows) script. The check is considered passing if the script exits with 0
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: exec-check
spec:
interval: 30
exec:
- description: "exec dummy check"
script: |
echo "hello"
name: exec-pass-check
test:
expr: 'results.Stdout == "hello"'
Field | Description | Scheme | Required |
---|---|---|---|
script | Script can be a inline script or a path to a script that needs to be executed. On windows executed via Powershell and in darwin and linux executed using bash. | string | Yes |
name | Name of the check, must be unique within the canary | string | Yes |
artifacts | Specify what files/folders generated by the script needs to be archived | []Artifact | |
checkout | Specify git repository to mount to the exec process | []GitCheckout | |
connections | Setup connections for the script (eg: aws credentials) | ExecConnection | |
env | Setup environment variables that are accessible to the exec process | []EnvVar | |
namespace | Namespace of the check | string | |
description | Description for the check | string | |
icon | Icon for overwriting default icon on the dashboard | string | |
labels | Labels for check | map[string]string | |
metrics | Metrics to export from | []Metrics | |
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 |
Docker Image variants
See image-variants
Exec Connection
Exec connections allow you to specify credentials for a list of CLI tools that are needed by your scripts. Eg: You can specify the AWS connection name and the credential files along with the necessary environment variables will be setup on the host running the script.
Field | Description | Type | Required |
---|---|---|---|
aws | AWS connection | AWSConnection | |
gcp | GCP connection | GCPConnection | |
azure | Azure connection | AzureConnection |
Artifact
Field | Description | Type | Required |
---|---|---|---|
path | Path or glob. | string | true |
See artifacts
Git Checkout
For authentication, either provide the connection name or the basic auth or the certificate.
Field | Description | Type | Required |
---|---|---|---|
url | Git repository URL. | string | true |
connection | Specify the connection name to use for git authentication (if required) | EnvVar | |
username | Git auth username. | EnvVar | |
password | Git auth password. | EnvVar | |
certificate | Git auth certificate. | EnvVar | |
destination | Destination is the full path to where the contents of the URL should be downloaded to. If left empty, the sha256 hash of the URL will be used as the dir name. | string |