Last generated July 6, 2026
Workflow
Workflow is the Schema for the workflows API
Version v1alpha1
Example CR
apiVersion: muster.giantswarm.io/v1alpha1
kind: Workflow
metadata:
name: deploy-application
namespace: default
spec:
description: "Deploy application to production environment with validation"
args:
app_name:
type: string
required: true
description: "Name of the application to deploy"
environment:
type: string
default: "production"
description: "Target deployment environment"
replicas:
type: integer
default: 3
description: "Number of application replicas"
steps:
- id: build_image
tool: docker_build
args:
name: "{{.input.app_name}}"
tag: "{{.input.environment}}-latest"
output: true
- id: deploy_service
tool: kubectl_apply
args:
name: "{{.input.app_name}}-{{.input.environment}}"
image: "{{.results.build_image.image_id}}"
replicas: "{{.input.replicas}}"
output: true
- id: verify_deployment
tool: health_check
args:
service_name: "{{.results.deploy_service.name}}"
timeout: "5m"
output: true
Properties
.apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
.kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
.metadata
.spec
WorkflowSpec defines the desired state of Workflow
.spec.args
Args defines the argument schema for workflow execution validation.
.spec.description
Description provides a human-readable description of the workflow’s purpose.
.spec.onFailure
OnFailure defines best-effort cleanup/rollback steps that run when the workflow fails on a step that does not allow failure. The steps execute sequentially and their own failures are tolerated.
.spec.onFailure[*]
WorkflowSubStep is a tool-call step used inside forEach bodies, parallel groups, and onFailure handlers. Unlike WorkflowStep it cannot itself contain forEach or parallel, which keeps the CRD schema structural (non-recursive).
.spec.onFailure[*].allowFailure
AllowFailure defines if in case of an error execution continues.
.spec.onFailure[*].args
Args provides arguments for the tool execution (supports templating).
.spec.onFailure[*].condition
Condition defines an optional condition that determines whether this sub-step should execute.
.spec.onFailure[*].condition.args
Args provides the arguments to pass to the condition tool. Values may be any JSON type.
.spec.onFailure[*].condition.expect
Expect defines positive health check expectations.
.spec.onFailure[*].condition.expect.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.onFailure[*].condition.expect.success
Success indicates whether the tool call should succeed.
.spec.onFailure[*].condition.expectNot
ExpectNot defines negative health check expectations.
.spec.onFailure[*].condition.expectNot.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.onFailure[*].condition.expectNot.success
Success indicates whether the tool call should succeed.
.spec.onFailure[*].condition.fromStep
FromStep specifies the step ID to reference for condition evaluation.
.spec.onFailure[*].condition.template
Template is a boolean Go-template gate. When set, the step executes only if the template renders to “true” (e.g. “{{ eq .input.env \“production\” }}“). Mutually exclusive with Tool/FromStep; when present, Expect/ExpectNot are ignored.
.spec.onFailure[*].condition.tool
Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.
.spec.onFailure[*].description
Description provides human-readable documentation for this sub-step’s purpose.
.spec.onFailure[*].id
ID is the unique identifier for this sub-step.
.spec.onFailure[*].output
Output indicates whether this sub-step’s result is included in the workflow’s returned document. The result is always referenceable by later steps regardless of this flag. When unset, the deprecated Store flag is used as a fallback.
.spec.onFailure[*].store
Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.
.spec.onFailure[*].tool
Tool specifies the name of the tool to execute.
.spec.output
Output is an optional output template that shapes the workflow’s returned document. It is rendered once after all steps complete, against .input / .results / .vars, and replaces the default {execution_id, workflow, status, input, steps[], …} response. Each leaf is a Go-template/sprig expression; JSON structure is preserved so numbers stay numbers and arrays stay arrays (e.g. “{{ .results.pods.items }}” or “{{ len .results.events.items }}”). A leaf’s type comes from the value it evaluates to, not from how its rendered text looks: a single-action leaf keeps its real type (a number stays a number, “{{ len .x }}” is a number), and a computed string keeps its exact string form, so values whose form matters (leading zeros, versions, IDs like “08” or “1.20”) are preserved without any coercion or workaround. Every step result is referenceable here regardless of its output flag. When omitted, the default response is returned unchanged.
.spec.steps
Steps defines the sequence of workflow steps defining the execution flow.
.spec.steps[*]
WorkflowStep defines a single step in the workflow execution. A step is exactly one of: a tool call (tool), a sequential loop (forEach), or a concurrent group (parallel).
.spec.steps[*].allowFailure
AllowFailure defines if in case of an error the next step is executed or not.
.spec.steps[*].args
Args provides arguments for the tool execution (supports templating). Values may be any JSON type (string, integer, boolean, number, object, array) because the schema uses x-kubernetes-preserve-unknown-fields. Templated strings such as “{{.input.namespace}}” are resolved server-side at execution time.
.spec.steps[*].condition
Condition defines an optional condition that determines whether this step should execute.
.spec.steps[*].condition.args
Args provides the arguments to pass to the condition tool. Values may be any JSON type.
.spec.steps[*].condition.expect
Expect defines positive health check expectations.
.spec.steps[*].condition.expect.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].condition.expect.success
Success indicates whether the tool call should succeed.
.spec.steps[*].condition.expectNot
ExpectNot defines negative health check expectations.
.spec.steps[*].condition.expectNot.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].condition.expectNot.success
Success indicates whether the tool call should succeed.
.spec.steps[*].condition.fromStep
FromStep specifies the step ID to reference for condition evaluation.
.spec.steps[*].condition.template
Template is a boolean Go-template gate. When set, the step executes only if the template renders to “true” (e.g. “{{ eq .input.env \“production\” }}“). Mutually exclusive with Tool/FromStep; when present, Expect/ExpectNot are ignored.
.spec.steps[*].condition.tool
Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.
.spec.steps[*].description
Description provides human-readable documentation for this step’s purpose.
.spec.steps[*].forEach
ForEach executes a body of sub-steps once per item of a list. Mutually exclusive with tool and parallel.
.spec.steps[*].forEach.as
As is the loop variable name made available to the body as
“{{ .vars.
.spec.steps[*].forEach.items
Items is a template expression that must resolve to an array, e.g. “{{ .input.clusters }}”. Each element is bound to the loop variable for the duration of one iteration.
.spec.steps[*].forEach.steps
Steps is the body executed for each item.
.spec.steps[*].forEach.steps[*]
WorkflowSubStep is a tool-call step used inside forEach bodies, parallel groups, and onFailure handlers. Unlike WorkflowStep it cannot itself contain forEach or parallel, which keeps the CRD schema structural (non-recursive).
.spec.steps[*].forEach.steps[*].allowFailure
AllowFailure defines if in case of an error execution continues.
.spec.steps[*].forEach.steps[*].args
Args provides arguments for the tool execution (supports templating).
.spec.steps[*].forEach.steps[*].condition
Condition defines an optional condition that determines whether this sub-step should execute.
.spec.steps[*].forEach.steps[*].condition.args
Args provides the arguments to pass to the condition tool. Values may be any JSON type.
.spec.steps[*].forEach.steps[*].condition.expect
Expect defines positive health check expectations.
.spec.steps[*].forEach.steps[*].condition.expect.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].forEach.steps[*].condition.expect.success
Success indicates whether the tool call should succeed.
.spec.steps[*].forEach.steps[*].condition.expectNot
ExpectNot defines negative health check expectations.
.spec.steps[*].forEach.steps[*].condition.expectNot.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].forEach.steps[*].condition.expectNot.success
Success indicates whether the tool call should succeed.
.spec.steps[*].forEach.steps[*].condition.fromStep
FromStep specifies the step ID to reference for condition evaluation.
.spec.steps[*].forEach.steps[*].condition.template
Template is a boolean Go-template gate. When set, the step executes only if the template renders to “true” (e.g. “{{ eq .input.env \“production\” }}“). Mutually exclusive with Tool/FromStep; when present, Expect/ExpectNot are ignored.
.spec.steps[*].forEach.steps[*].condition.tool
Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.
.spec.steps[*].forEach.steps[*].description
Description provides human-readable documentation for this sub-step’s purpose.
.spec.steps[*].forEach.steps[*].id
ID is the unique identifier for this sub-step.
.spec.steps[*].forEach.steps[*].output
Output indicates whether this sub-step’s result is included in the workflow’s returned document. The result is always referenceable by later steps regardless of this flag. When unset, the deprecated Store flag is used as a fallback.
.spec.steps[*].forEach.steps[*].store
Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.
.spec.steps[*].forEach.steps[*].tool
Tool specifies the name of the tool to execute.
.spec.steps[*].id
ID is the unique identifier for this step within the workflow.
.spec.steps[*].output
Output indicates whether this step’s result is included in the workflow’s
returned document (what the caller receives). Every step result is always
referenceable by later steps via {{ .results.
.spec.steps[*].parallel
Parallel executes a group of sub-steps concurrently. Each sub-step resolves its arguments from the workflow state as it was before the group started; siblings cannot reference each other’s results. Mutually exclusive with tool and forEach.
.spec.steps[*].parallel[*]
WorkflowSubStep is a tool-call step used inside forEach bodies, parallel groups, and onFailure handlers. Unlike WorkflowStep it cannot itself contain forEach or parallel, which keeps the CRD schema structural (non-recursive).
.spec.steps[*].parallel[*].allowFailure
AllowFailure defines if in case of an error execution continues.
.spec.steps[*].parallel[*].args
Args provides arguments for the tool execution (supports templating).
.spec.steps[*].parallel[*].condition
Condition defines an optional condition that determines whether this sub-step should execute.
.spec.steps[*].parallel[*].condition.args
Args provides the arguments to pass to the condition tool. Values may be any JSON type.
.spec.steps[*].parallel[*].condition.expect
Expect defines positive health check expectations.
.spec.steps[*].parallel[*].condition.expect.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].parallel[*].condition.expect.success
Success indicates whether the tool call should succeed.
.spec.steps[*].parallel[*].condition.expectNot
ExpectNot defines negative health check expectations.
.spec.steps[*].parallel[*].condition.expectNot.jsonPath
JsonPath defines JSON path conditions to check in the result. Values may be any JSON type (typically scalars compared to a result field).
.spec.steps[*].parallel[*].condition.expectNot.success
Success indicates whether the tool call should succeed.
.spec.steps[*].parallel[*].condition.fromStep
FromStep specifies the step ID to reference for condition evaluation.
.spec.steps[*].parallel[*].condition.template
Template is a boolean Go-template gate. When set, the step executes only if the template renders to “true” (e.g. “{{ eq .input.env \“production\” }}“). Mutually exclusive with Tool/FromStep; when present, Expect/ExpectNot are ignored.
.spec.steps[*].parallel[*].condition.tool
Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.
.spec.steps[*].parallel[*].description
Description provides human-readable documentation for this sub-step’s purpose.
.spec.steps[*].parallel[*].id
ID is the unique identifier for this sub-step.
.spec.steps[*].parallel[*].output
Output indicates whether this sub-step’s result is included in the workflow’s returned document. The result is always referenceable by later steps regardless of this flag. When unset, the deprecated Store flag is used as a fallback.
.spec.steps[*].parallel[*].store
Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.
.spec.steps[*].parallel[*].tool
Tool specifies the name of the tool to execute.
.spec.steps[*].store
Store is a deprecated alias for Output. It originally also controlled whether a step result was referenceable by later steps, but referencing is now always available; Store now only affects result visibility and is kept for backwards compatibility. Prefer Output.
.spec.steps[*].tool
Tool specifies the name of the tool to execute for this step. Mutually exclusive with forEach and parallel.
.status
WorkflowStatus defines the observed state of Workflow
.status.conditions
Conditions represent the latest available observations of the workflow’s state.
.status.conditions[*]
Condition contains details for one aspect of the current state of this API Resource.
.status.conditions[*].lastTransitionTime
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
.status.conditions[*].message
message is a human readable message indicating details about the transition. This may be an empty string.
.status.conditions[*].observedGeneration
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
.status.conditions[*].reason
reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
.status.conditions[*].status
status of the condition, one of True, False, Unknown.
.status.conditions[*].type
type of condition in CamelCase or in foo.example.com/CamelCase.
.status.referencedTools
ReferencedTools lists all tools mentioned in the Workflow steps. This is informational only; actual availability depends on the user’s session. See ADR 007 for details on session-scoped tool visibility.
.status.referencedTools[*]
.status.stepCount
StepCount is the number of steps in the workflow.
.status.valid
Valid indicates whether the Workflow spec passes structural validation.
.status.validationErrors
ValidationErrors contains any spec validation error messages.
.status.validationErrors[*]
This documentation page shows information based on muster v0.22.10.
Need help with the platform API?
We listen in your Slack support channel. And of course, we welcome your pull requests to improve these docs!