New to Kestra?
Use blueprints to kickstart your first workflows.
Ramp feature flags safely in Kestra: each rollout stage waits, checks Prometheus error rates, and auto-disables the flag and opens an issue on breach.
Diagram unavailable
We could not build the topology for this blueprint. The flow itself is valid, use the YAML on the left to run it.
Feature flags give you a release switch, but a switch is not a rollout strategy. Someone flips the flag to 100 percent, the error rate climbs, and the rollback conversation happens in a channel while customers are already affected. Progressive delivery fixes the shape: small percentages, real observation, and an automatic stop. This blueprint makes the ramp itself a workflow - each stage is one loop iteration that sets the flag, waits for genuine traffic, measures the error rate, and either advances or kills the flag and opens a ticket.
ramp_stages (io.kestra.plugin.core.flow.Loop) iterates over your ramp_percentages input - by default 10, 25, 50, 100.set_stage (io.kestra.plugin.core.http.Request, PATCH with Bearer {{ secret('FLAG_API_TOKEN') }}) sends the LaunchDarkly-style JSON-patch that turns the flag on at that percentage; adapt the path and body to Unleash or any OpenFeature provider.observe_stage (io.kestra.plugin.core.flow.Sleep) holds for observation_minutes so the stage is judged on real user traffic, not on the deploy moment.error_rate_check (io.kestra.plugin.prometheus.Query, FETCH_ONE) computes the 5xx ratio for the flagged traffic over the last five minutes as a single scalar.guard (io.kestra.plugin.core.flow.If) compares it against max_error_rate. On breach: disable_flag PATCHes the flag off and to zero percent, open_issue (io.kestra.plugin.github.issues.Create) files a labeled ticket with the stage and the rate, alert_slack notifies, and fail_ramp (core.execution.Fail) stops the execution - the flow-level errors handler repeats the reason to Slack for anyone watching the release channel.announce_full_rollout posts the completed ramp as a single green message.flag, stages_planned, and ramp outputs for release dashboards.Ramps usually live in CI scripts that cannot wait an hour without burning runners, or in cron glue that hides its state. Kestra gives the ramp durable waits, an execution per rollout with every stage's verdict as history, native plugin tasks for Prometheus and the flag API, and a failure path that disables the flag instead of just turning red.
flag label (or adapt the selector) exposing http_requests_total.FLAG_API_TOKEN: token with flag-write access for the target environment.PROMETHEUS_URL: base URL of the Prometheus server, e.g. http://prometheus:9090.SLACK_WEBHOOK_URL: Slack incoming webhook for abort and success messages.GITHUB_TOKEN: token with issue-write access to the repository input.key with a strong random value.flag_api_url at your provider's flag endpoint and set flag_key / flag_environment.flag label if it differs.max_error_rate to 0) and confirm the flag disables, the issue appears, and the execution fails.prometheus.Query on a p99 histogram and require both to pass in the guard condition.Subflow loop over a JSON list of flag keys.then branch, add a Kubernetes rollout undo or Argo CD sync task before fail_ramp for flags that ship new binaries, not just config.