Fundamental concepts behind workflows
WorkflowTemplate
is a reusable definition of a workflow. It contains:
WorkflowTemplate
resources are designed to be generic and reusable across different environments and use cases.
WorkflowRun
is an instance of a WorkflowTemplate
. It is created to execute a workflow with a specific set of arguments. It contains:
templateRef
: A reference to the WorkflowTemplate
to be executed.arguments
: A set of key-value pairs that provide values for the parameters defined in the WorkflowTemplate
.WorkflowRun
is a one-time execution of a workflow. Once it completes, it will not run again.
WorkflowRunTemplate
is a controller that automates the creation of WorkflowRun
resources. It allows you to run workflows on a schedule or in response to changes. It contains:
runSpec
: A WorkflowRunSpec
that defines the WorkflowRun
to be created.runPolicy
: A policy that determines when to create a new WorkflowRun
. The following policies are supported:
once
: Creates a WorkflowRun
only once.scheduled
: Creates WorkflowRun
resources on a schedule, defined by a cron
expression or a fixed every
interval.onChange
: Creates a WorkflowRun
whenever the WorkflowRunTemplate
spec changes.