Last generated July 6, 2026

Workflow

Workflow is the Schema for the workflows API

Full name:
workflows.muster.giantswarm.io
Group:
muster.giantswarm.io
Singular name:
workflow
Plural name:
workflows
Scope:
Namespaced
Versions:
v1alpha1

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

string

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

string

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

object

.spec

object

WorkflowSpec defines the desired state of Workflow

.spec.args

object

Args defines the argument schema for workflow execution validation.

.spec.description

string

Description provides a human-readable description of the workflow’s purpose.

.spec.onFailure

array

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[*]

object

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

boolean

AllowFailure defines if in case of an error execution continues.

.spec.onFailure[*].args

object

Args provides arguments for the tool execution (supports templating).

.spec.onFailure[*].condition

object

Condition defines an optional condition that determines whether this sub-step should execute.

.spec.onFailure[*].condition.args

object

Args provides the arguments to pass to the condition tool. Values may be any JSON type.

.spec.onFailure[*].condition.expect

object

Expect defines positive health check expectations.

.spec.onFailure[*].condition.expect.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.onFailure[*].condition.expectNot

object

ExpectNot defines negative health check expectations.

.spec.onFailure[*].condition.expectNot.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.onFailure[*].condition.fromStep

string

FromStep specifies the step ID to reference for condition evaluation.

.spec.onFailure[*].condition.template

string

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

string

Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.

.spec.onFailure[*].description

string

Description provides human-readable documentation for this sub-step’s purpose.

.spec.onFailure[*].id

string Required

ID is the unique identifier for this sub-step.

.spec.onFailure[*].output

boolean

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

boolean

Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.

.spec.onFailure[*].tool

string Required

Tool specifies the name of the tool to execute.

.spec.output

object

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

array Required

Steps defines the sequence of workflow steps defining the execution flow.

.spec.steps[*]

object

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

boolean

AllowFailure defines if in case of an error the next step is executed or not.

.spec.steps[*].args

object

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

object

Condition defines an optional condition that determines whether this step should execute.

.spec.steps[*].condition.args

object

Args provides the arguments to pass to the condition tool. Values may be any JSON type.

.spec.steps[*].condition.expect

object

Expect defines positive health check expectations.

.spec.steps[*].condition.expect.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].condition.expectNot

object

ExpectNot defines negative health check expectations.

.spec.steps[*].condition.expectNot.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].condition.fromStep

string

FromStep specifies the step ID to reference for condition evaluation.

.spec.steps[*].condition.template

string

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

string

Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.

.spec.steps[*].description

string

Description provides human-readable documentation for this step’s purpose.

.spec.steps[*].forEach

object

ForEach executes a body of sub-steps once per item of a list. Mutually exclusive with tool and parallel.

.spec.steps[*].forEach.as

string

As is the loop variable name made available to the body as “{{ .vars. }}”. Defaults to “item”.

.spec.steps[*].forEach.items

string Required

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

array Required

Steps is the body executed for each item.

.spec.steps[*].forEach.steps[*]

object

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

boolean

AllowFailure defines if in case of an error execution continues.

.spec.steps[*].forEach.steps[*].args

object

Args provides arguments for the tool execution (supports templating).

.spec.steps[*].forEach.steps[*].condition

object

Condition defines an optional condition that determines whether this sub-step should execute.

.spec.steps[*].forEach.steps[*].condition.args

object

Args provides the arguments to pass to the condition tool. Values may be any JSON type.

.spec.steps[*].forEach.steps[*].condition.expect

object

Expect defines positive health check expectations.

.spec.steps[*].forEach.steps[*].condition.expect.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].forEach.steps[*].condition.expectNot

object

ExpectNot defines negative health check expectations.

.spec.steps[*].forEach.steps[*].condition.expectNot.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].forEach.steps[*].condition.fromStep

string

FromStep specifies the step ID to reference for condition evaluation.

.spec.steps[*].forEach.steps[*].condition.template

string

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

string

Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.

.spec.steps[*].forEach.steps[*].description

string

Description provides human-readable documentation for this sub-step’s purpose.

.spec.steps[*].forEach.steps[*].id

string Required

ID is the unique identifier for this sub-step.

.spec.steps[*].forEach.steps[*].output

boolean

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

boolean

Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.

.spec.steps[*].forEach.steps[*].tool

string Required

Tool specifies the name of the tool to execute.

.spec.steps[*].id

string Required

ID is the unique identifier for this step within the workflow.

.spec.steps[*].output

boolean

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.. }} regardless of this flag; Output only controls visibility in the returned result. When unset, the deprecated Store flag is used as a fallback.

.spec.steps[*].parallel

array

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[*]

object

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

boolean

AllowFailure defines if in case of an error execution continues.

.spec.steps[*].parallel[*].args

object

Args provides arguments for the tool execution (supports templating).

.spec.steps[*].parallel[*].condition

object

Condition defines an optional condition that determines whether this sub-step should execute.

.spec.steps[*].parallel[*].condition.args

object

Args provides the arguments to pass to the condition tool. Values may be any JSON type.

.spec.steps[*].parallel[*].condition.expect

object

Expect defines positive health check expectations.

.spec.steps[*].parallel[*].condition.expect.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].parallel[*].condition.expectNot

object

ExpectNot defines negative health check expectations.

.spec.steps[*].parallel[*].condition.expectNot.jsonPath

object

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

boolean

Success indicates whether the tool call should succeed.

.spec.steps[*].parallel[*].condition.fromStep

string

FromStep specifies the step ID to reference for condition evaluation.

.spec.steps[*].parallel[*].condition.template

string

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

string

Tool specifies the name of the tool to execute for condition evaluation. Optional when FromStep or Template is used.

.spec.steps[*].parallel[*].description

string

Description provides human-readable documentation for this sub-step’s purpose.

.spec.steps[*].parallel[*].id

string Required

ID is the unique identifier for this sub-step.

.spec.steps[*].parallel[*].output

boolean

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

boolean

Store is a deprecated alias for Output, kept for backwards compatibility. Prefer Output.

.spec.steps[*].parallel[*].tool

string Required

Tool specifies the name of the tool to execute.

.spec.steps[*].store

boolean

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

string

Tool specifies the name of the tool to execute for this step. Mutually exclusive with forEach and parallel.

.status

object

WorkflowStatus defines the observed state of Workflow

.status.conditions

array

Conditions represent the latest available observations of the workflow’s state.

.status.conditions[*]

object

Condition contains details for one aspect of the current state of this API Resource.

.status.conditions[*].lastTransitionTime

string Required

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

string Required

message is a human readable message indicating details about the transition. This may be an empty string.

.status.conditions[*].observedGeneration

integer

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

string Required

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

string Required

status of the condition, one of True, False, Unknown.

.status.conditions[*].type

string Required

type of condition in CamelCase or in foo.example.com/CamelCase.

.status.referencedTools

array

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[*]

string

.status.stepCount

integer

StepCount is the number of steps in the workflow.

.status.valid

boolean

Valid indicates whether the Workflow spec passes structural validation.

.status.validationErrors

array

ValidationErrors contains any spec validation error messages.

.status.validationErrors[*]

string

This documentation page shows information based on muster v0.22.10.