Skip to content

WorkflowSchedule

A WorkflowSchedule runs an immutable recipe as recurring or continuous WorkflowRun cycles without an external scheduler or outer conductor loop.

It supports two triggering modes:

  • Interval: launches a new WorkflowRun every intervalSeconds (for example, periodic SLO checks, rollout validation, or drift audits).
  • Continuous: launches the next WorkflowRun automatically cooldownSeconds after the previous run settles, enabling perpetual autonomous development, continuous black-box QA, and bug hunting.

The rollout schedule sample runs the rollout validation recipe every 300 seconds with carryForwardOutput: true:

Terminal window
kubectl --namespace team-a apply -f config/samples/workflow-recipe-rollout-validation.yaml
kubectl --namespace team-a apply -f config/samples/workflowschedule-rollout.yaml
kubectl --namespace team-a get workflowschedule checkout-slo-watch --watch

The continuous QA sample runs continuously under the staging/checkout PathLease scope, waits 30 seconds after a passing cycle (or 120 seconds after a failure), and passes the previous cycle’s bounded JSON output into the next cycle’s Recipe inputs (JSON) as priorCycle:

Terminal window
kubectl --namespace team-a apply -f config/samples/workflowschedule-continuous.yaml
Field Purpose
agentSet Immutable AgentSet name in the schedule’s namespace.
recipe Reference to an immutable recipe ConfigMap (name, key). Updating recipe rolls future cycles onto a new recipe revision.
inputs Optional static recipe inputs.
scope Optional non-Git PathLease scope (<domain>/<name>), mutually exclusive with repository.
repository, targetBranch, gitCredentialsSecretRef Optional Git target for repository-backed continuous recipes, mutually exclusive with scope.
mode Interval (default) or Continuous.
intervalSeconds Cadence in seconds for Interval mode (10 to 86400).
cooldownSeconds Pause after a succeeded cycle in Continuous mode (defaults to 10s).
failureBackoffSeconds Pause after a failed or canceled cycle before retrying (defaults to 60s).
concurrencyPolicy Forbid (default) skips overlapping Interval runs; Replace cancels the active run when the next interval arrives.
suspend Set true to pause new cycles while retaining status and history.
maxCycles Optional total cycle cap (0 runs indefinitely).
historyLimit Number of finished child WorkflowRuns retained before older runs are deleted (defaults to 10, max 50).
carryForwardOutput Passes the prior cycle’s outcome and bounded last-step JSON output (up to 4 KiB) into Recipe inputs (JSON) as priorCycle.

status reports observedGeneration, total cycles, activeRun, lastScheduledTime, nextRunTime, lastPublishedCommit, lastRun, and the Ready condition (Running, Scheduled, Suspended, Completed, InvalidSchedule, or InvalidRecipe). kslip emits Kubernetes Events on CycleStarted, CycleSucceeded, and CycleFailed.