New to Kestra?
Use blueprints to kickstart your first workflows.
Verify canary deployments with Kestra. A webhook fires after deploy, queries the canary error rate from Prometheus, and pages Discord when unhealthy.
A canary deployment without an automated verdict is just a slow rollout. This blueprint makes the verdict a flow. The deploy pipeline calls a Kestra webhook the moment the canary starts taking traffic. Ten minutes of signal later, io.kestra.plugin.prometheus.Query computes the canary's 5xx error rate with fetchType: FETCH_ONE, and an If task delivers the verdict. Healthy, the flow logs the measured rate and exits green, telling the pipeline to promote. Unhealthy, it pages Discord with the number and fails through io.kestra.plugin.core.execution.Fail, stopping the rollout.
deploy_webhook (io.kestra.plugin.core.trigger.Webhook) starts the flow when the deploy pipeline calls the webhook URL with the configured key. Replace change-me-strong-webhook-key with a strong random value before use.canary_error_rate (io.kestra.plugin.prometheus.Query, fetchType: FETCH_ONE) evaluates the PromQL ratio scoped to version="canary" over a 10 minute window, exposing the single row as {{ outputs.canary_error_rate.row }}.verdict (io.kestra.plugin.core.flow.If) compares the scalar against a 1 percent threshold. The healthy branch logs the rate; the unhealthy branch pages Discord, then fails the execution with the rate in the errorMessage.errors block posts a Discord alert on any failed execution, covering both a burning canary and a broken query, so a rollout never proceeds on missing data.CI systems are good at shipping artifacts and bad at waiting on metrics. Moving the verification into Kestra gives the check retries, a full execution history of every verdict with the measured rate, secrets management for the Prometheus endpoint, and a webhook interface any pipeline can call with one curl command.
username and password properties if Prometheus sits behind one.PROMETHEUS_URL: base URL of the Prometheus server, e.g. http://prometheus:9090.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.PROMETHEUS_URL and DISCORD_WEBHOOK_URL secrets to your Kestra namespace.key with a strong random value.{{ trigger.body }}.io.kestra.plugin.core.flow.Pause task between the webhook and the query.