Skip to Content
Workloads

Workflow

Run a Workflow, start runs and read their steps and logs, branch on a step's output, share a database between steps, and retry, pause, cancel or replay a run.

This page lists the spec and status fields of Workflow and WorkflowRun, each with its type, its limits and its description. The Platform page explains the concept, and the metadata of every kind is the same.

Workflow

apiVersion: funcd.io/v1alpha1
kind: Workflow
metadata:
  name: orders
  namespace: default
  resourceGroup: rg1
spec:
  steps:
    - name: ingest
      function:
        image: registry.example/orders-ingest:1.0.0
    - name: hold
      builtin:
        wait: 30s
      dependsOn:
        - ingest
apiVersionkind
funcd.io/v1alpha1Workflow

Workflow.spec

FieldType and limitsDescription
bucketsarray of Workflow.spec.buckets[]The Buckets for the steps to bind. An entry with a name defines a bucket, each prefix owner naming a step or a declared lake; a ref entry declares an existing one. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
configMapsarray of Workflow.spec.configMaps[]The ConfigMaps for the steps to bind: an entry with a name defines one, deleted with the Workflow, and a ref entry declares an existing one. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
contractobject, Workflow.spec.contractA contract the author declares for the run input and output. funcd checks its schemas at apply, but runs are checked against the contract it derives from the steps, in status.contract, not against this one.
kvarray of Workflow.spec.kv[]The KV stores for the steps to bind. An entry with a name defines a store, each table owner naming a step; a ref entry declares an existing one. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
lakesarray of Workflow.spec.lakes[]The Lakes for the steps to bind: an entry with a name defines one, deleted with the Workflow, and a ref entry declares an existing one. A defined lake may not share a step's name, and its buckets, ConfigMaps and Secrets are declared at the Workflow's root. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
onFailurestring, a DNS-1123 labelThe name of a function step that funcd calls once, without retry, when a run fails. Its input is an object of workflow, run, failedStep, reason and input, the run input. It is not part of the step order, so it sets no dependsOn, when or params and no step depends on it; its result never changes the run's phase, and a cancelled run does not call it.
poolingobject, Workflow.spec.poolingHow the image steps' Functions share workers and stay warm. A step's function.pooling replaces it for that step.
secretsarray of Workflow.spec.secrets[]The Secrets the steps bind, with the keys they read. Until each Secret exists and holds its keys, the Workflow is not Ready and no run of it starts. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
sqlarray of Workflow.spec.sql[]The SQL databases for the steps to bind. An entry with a name defines a database, its owner naming a step or a declared lake; a ref entry declares an existing one. An App's spec.workflows[] entry must leave it empty: its steps bind what the App declares.
stepsarray of Workflow.spec.steps[], requiredThe steps each run executes, at least one. They run in list order unless dependsOn says otherwise, and the first step takes the run input.
timeoutstring, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)The wall-clock bound on a whole run, paused time excluded: 0s to 168h; 0s or unset means no bound.

Workflow.spec.buckets[]

FieldType and limitsDescription
deletionstring, one of retain, deleteretain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry.
namestring, a DNS-1123 labelThe object's name. It takes the namespace and resource group of the resource that declares it.
prefixesarray of Workflow.spec.buckets[].prefixes[]The Bucket's prefixes, each a key space with its own owner and cap. Prefix names are unique within the Bucket. A Function or a Lake that binds a prefix the Bucket does not list waits, with the reason BucketNotFound.
quotaobject, Workflow.spec.buckets[].quotaCaps on the Bucket's total size and on each object. While the Bucket has a size cap, funcd refuses to sign a presigned PUT URL for it, with 403.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.

Workflow.spec.buckets[].prefixes[]

FieldType and limitsDescription
namestring, required, a DNS-1123 labelThe prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.
ownerobject, Workflow.spec.buckets[].prefixes[].ownerThe one Function, Lake or Job that may write the prefix, named with its kind, besides the writers that a RolesAssignment names. In a Bucket that a Function, a Lake or a Job declares by name, an omitted owner is that workload. In a Workflow's buckets, a Function owner names a step and a Lake owner a lake that the Workflow declares. The prefix that a Site serves its bundle from must have no owner, since the Site writes its builds there; the prefixes of a Site's ingress rules may have one.
quotaobject, Workflow.spec.buckets[].prefixes[].quotaA cap on the prefix's total size: a write into the prefix must fit both this cap and the Bucket's, and while it is set funcd refuses to sign a presigned PUT URL into the prefix, with 403. It also caps a Lake's files under the prefix, though not the Lake's catalog.

Workflow.spec.buckets[].prefixes[].owner

FieldType and limitsDescription
kindstring, required, one of Function, Lake, JobThe workload's kind. A Function, a Lake and a Job may share a name, so the kind says which one it is; each field names the kinds it accepts.
namestring, required, a DNS-1123 labelThe workload's name, in the object's namespace.

Workflow.spec.buckets[].prefixes[].quota

FieldType and limitsDescription
maxBytesinteger, at least 0The same cap as a number of bytes. Set maxSize or maxBytes, not both.
maxSizestring, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap.

Workflow.spec.buckets[].quota

FieldType and limitsDescription
maxBytesinteger, at least 0The same cap as a number of bytes. Set maxSize or maxBytes, not both.
maxObjectBytesinteger, at least 0The largest object a write may store, in bytes. A larger write gets 413, or EntityTooLarge over S3, and while it is set funcd refuses to sign a presigned PUT URL for the Bucket, with 403. 0 sets no cap of the Bucket's own, so only funcd's upload limits apply, such as s3gateway.maxUploadBytes.
maxSizestring, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap.

Workflow.spec.configMaps[]

FieldType and limitsDescription
datamap of string to stringKeys and their string values, for settings that are not secret. Each key is an environment variable name: ASCII letters, digits and _, not starting with a digit. Each value must be UTF-8 text with no NUL byte: a Function or a Lake that binds a ConfigMap holding another value does not start. Each worker of a Function that lists the ConfigMap in bindings.config gets each key as an environment variable when it starts, except a key that starts with FUNCD_ or that a bound Secret also holds; and while the S3 gateway is on, a Function that binds a Bucket gets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY that funcd issues it, in place of the ConfigMap's. A Lake that lists it gives its engine only the keys that the Lake's bindings.config lets through.
namestring, a DNS-1123 labelThe ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.

Workflow.spec.contract

FieldType and limitsDescription
dialectstringThe URI of the JSON Schema dialect that input and output follow. funcd checks nothing against it.
inputany JSON valueThe JSON Schema of the input. A declared one must be an object, and each property it does not require must declare a default.
outputany JSON valueThe JSON Schema of the output. A declared one must be an object, and each property it does not require must declare a default.

Workflow.spec.kv[]

FieldType and limitsDescription
deletionstring, one of retain, deleteretain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry.
namestring, a DNS-1123 labelThe object's name. It takes the namespace and resource group of the resource that declares it.
quotaobject, Workflow.spec.kv[].quotaCaps on the store's total size, on each value and on each key.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.
tablesarray of Workflow.spec.kv[].tables[]The store's tables. A table is a key space that only its owner and the writers that a RolesAssignment names may write. Table names are unique within the store, and a store with no table has nothing a Function can write.

Workflow.spec.kv[].quota

FieldType and limitsDescription
maxBytesinteger, at least 0The same cap as a number of bytes. Set maxSize or maxBytes, not both.
maxKeyBytesinteger, 0 to 64000The longest key, in bytes. 0 means 1024 (1 KiB).
maxSizestring, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)The cap on the total size held, above zero. Set maxSize or maxBytes, not both; neither means no cap. A write that would pass the cap gets 507 in a KV store or a Bucket; a SQL execute call gets 507 once the database holds the cap.
maxValueBytesinteger, 0 to 1048576The largest value a write may store, in bytes. 0 means 1048576 (1 MiB).

Workflow.spec.kv[].tables[]

FieldType and limitsDescription
namestring, required, a DNS-1123 labelThe table's name, unique within the store.
ownerobject, Workflow.spec.buckets[].prefixes[].ownerThe Function or Job that owns the table, in the store's namespace, named with its kind. The owner writes the table, and so does a principal that a RolesAssignment grants kv::write on the table, its store or its namespace, such as the KV Data Writer role. In a store that a Function or a Job declares, the owner defaults to that workload; in one that a Workflow declares, a Function owner names a step, and the Function that funcd creates for that step is the owner; in a KVStore applied on its own, a table with no owner is written only through such a grant. Every workload, the owner included, reaches the table through an entry of its spec.bindings.kv.

Workflow.spec.lakes[]

FieldType and limitsDescription
bindingsobject, Workflow.spec.lakes[].bindingsWhat the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment.
bucketsarray of Workflow.spec.lakes[].buckets[]The Buckets that a Lake applied on its own declares: by name the Lake creates the Bucket, an omitted prefix owner being the Lake, and a Bucket of that name that is not the Lake's holds it in Pending with StoreNotOwned; by ref it binds an existing one. Each Bucket that the Lake's bindings.blob names must be declared here. A lake that another resource declares sets none.
configMapsarray of Workflow.spec.lakes[].configMaps[]The ConfigMaps that a Lake applied on its own declares: by name the Lake defines one, and a ConfigMap of its stored name that is not the Lake's holds it in Pending with StoreNotOwned; by ref it binds an existing one. Each ConfigMap that the Lake's bindings.config names must be declared here. A lake that another resource declares sets none.
ingressobject, Workflow.spec.lakes[].ingressExposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/<name>, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself.
locationobject, Workflow.spec.lakes[].locationThe Bucket prefix that holds the Lake's files, one of the Lake's bindings.blob. The Lake waits in Pending, with the reason PrefixNotOwned, until the prefix's owner is this Lake. The Lake's catalog is kept outside the Bucket, under the same location, so a Lake located where another was finds that Lake's files and catalog.
namestring, a DNS-1123 labelThe object's name. It takes the namespace and resource group of the resource that declares it.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.
resourcesobject, Workflow.spec.lakes[].resourcesThe cpu and memory of the Lake's engine. An empty cpu or memory sets no limit on it, and a change replaces the running engine.
secretsarray of Workflow.spec.lakes[].secrets[]The Secrets that a Lake applied on its own declares, with the keys its engine reads. Each Secret that the Lake's bindings.secret names must be declared here, and the Lake waits in Pending, with SecretNotFound or SecretKeyMissing, while one is missing or lacks a key. A lake that another resource declares sets none.

Workflow.spec.lakes[].bindings

FieldType and limitsDescription
blobarray of Workflow.spec.lakes[].bindings.blob[], requiredThe Bucket prefixes the engine may read, each under an alias. It writes only a prefix whose owner is this Lake, and the Lake's location must be one of them.
configarray of string values, each a DNS-1123 labelConfigMaps whose data the engine gets as environment variables. Only QUACK_TOKEN and the DUCKDB_ keys pass, DUCKDB_EXTENSION_DIRECTORY excepted, and a bound Secret's value wins over a ConfigMap's for the same key. A missing ConfigMap holds the Lake in Pending, with the reason BindingResolveFailed.
secretarray of string values, each a DNS-1123 labelSecrets whose data the engine gets as environment variables, such as its QUACK_TOKEN; the same keys pass as for config. funcd asks Cedar, as the Lake, for secret::read on each: a forbidden Secret holds the Lake in Pending, with the reason BindingResolveFailed, as does a missing one in a lake that another resource declares. A changed value replaces the engine.

Workflow.spec.lakes[].bindings.blob[]

FieldType and limitsDescription
aliasstring, required, a DNS-1123 labelThe binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.
bucketstring, required, a DNS-1123 labelThe Bucket, in the same namespace, that holds the prefix.
prefixstring, required, a DNS-1123 labelThe prefix, by its name in the Bucket's prefixes.

Workflow.spec.lakes[].buckets[]

FieldType and limitsDescription
deletionstring, one of retain, deleteretain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry.
namestring, a DNS-1123 labelThe object's name. It takes the namespace and resource group of the resource that declares it.
prefixesarray of Workflow.spec.buckets[].prefixes[]The Bucket's prefixes, each a key space with its own owner and cap. Prefix names are unique within the Bucket. A Function or a Lake that binds a prefix the Bucket does not list waits, with the reason BucketNotFound.
quotaobject, Workflow.spec.buckets[].quotaCaps on the Bucket's total size and on each object. While the Bucket has a size cap, funcd refuses to sign a presigned PUT URL for it, with 403.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.

Workflow.spec.lakes[].configMaps[]

FieldType and limitsDescription
datamap of string to stringKeys and their string values, for settings that are not secret. Each key is an environment variable name: ASCII letters, digits and _, not starting with a digit. Each value must be UTF-8 text with no NUL byte: a Function or a Lake that binds a ConfigMap holding another value does not start. Each worker of a Function that lists the ConfigMap in bindings.config gets each key as an environment variable when it starts, except a key that starts with FUNCD_ or that a bound Secret also holds; and while the S3 gateway is on, a Function that binds a Bucket gets the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY that funcd issues it, in place of the ConfigMap's. A Lake that lists it gives its engine only the keys that the Lake's bindings.config lets through.
namestring, a DNS-1123 labelThe ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.

Workflow.spec.lakes[].ingress

FieldType and limitsDescription
authobject, Workflow.spec.lakes[].ingress.authHow the edge checks callers at the resource's own address; unset, the namespace's spec.edgeDefaults.auth decides, else open. A Lake refuses it, since the Lake gateway checks each caller.
enabledbooleanTurns the resource's own address on or off. Unset, it is on unless the namespace's spec.defaultExposure is explicit; a Lake's address is on only when this is true.
hoststringThe exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.
pathstringThe edge path of the resource's own address, which begins with / and does not end with / unless it is /. Empty is / when host is set, else /function/<name>, /site/<name> or /lake/<name> by kind.

Workflow.spec.lakes[].ingress.auth

FieldType and limitsDescription
modestring, one of "", authenticated, open, oidcHow the edge checks callers. authenticated requires a bearer token, or an X-Api-Key header, of an identity that RBAC lets get Functions in the namespace: 401 without a valid one, 403 when it may not; while server.auth.edge is off, every caller gets 401. open lets anonymous callers in. oidc signs callers in with the OIDCProvider that provider names, and passes the signed-in user to the code behind it in the X-Funcd-Principal headers. Empty takes the enclosing stance, if any, else the namespace's spec.edgeDefaults.auth.mode, else open.
providerstring, a DNS-1123 labelWith mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.
unauthenticatedstring, one of "", redirect, 401, allowWith mode oidc, what a call that is not signed in gets: redirect, the default, sends a GET or HEAD navigation to the provider with 302 and gives any other call 401; 401 gives every such call 401; allow passes every call, with no principal. Refused with another mode.

Workflow.spec.lakes[].location

FieldType and limitsDescription
bucketstring, required, a DNS-1123 labelA Bucket of the same namespace.
prefixstring, required, a DNS-1123 labelA prefix of that Bucket.

Workflow.spec.lakes[].resources

FieldType and limitsDescription
cpustringThe CPU cap of the worker or engine it sizes, as a number of cores of at least 0.01, such as 0.5 or 2. Empty takes the default of the resource that declares it, or no cap when there is none. Only the containerd runtime enforces it.
memorystringThe memory cap of the worker or engine it sizes, such as 256Mi or 4GiB: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B, above zero. Empty takes the default of the resource that declares it, or no cap when there is none. Only the containerd runtime enforces it, and there a worker that uses more memory than the cap is killed.

Workflow.spec.lakes[].secrets[]

FieldType and limitsDescription
descriptionstringWhat the Secret is for, for the installer who provides it.
keysarray of string values, required, each matching ^[A-Za-z_][A-Za-z0-9_]*$The keys read from the Secret: its data must hold each of them.
namestring, required, a DNS-1123 labelThe name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.

Workflow.spec.pooling

FieldType and limitsDescription
minReplicasinteger, 0 to 15The workers kept warm for each image step's Function. 0, the default, scales a step's Function to zero after 5 minutes without a call, so its next call waits for a cold start.
modestring, one of shared, isolatedshared, the default, runs each image step's Function in the pool worker that worker names, shared with the steps of the same runtime that bind and own the same data; isolated gives each step's Function a worker of its own. Only the process runtime pools, for node runtimes and, with Python 3.14 or later, python ones; elsewhere shared runs each step's Function solo too.
workerstring, a DNS-1123 labelThe pool worker's name when mode is shared; empty means the Workflow's name. isolated ignores it.

Workflow.spec.secrets[]

FieldType and limitsDescription
descriptionstringWhat the Secret is for, for the installer who provides it.
keysarray of string values, required, each matching ^[A-Za-z_][A-Za-z0-9_]*$The keys read from the Secret: its data must hold each of them.
namestring, required, a DNS-1123 labelThe name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.

Workflow.spec.sql[]

FieldType and limitsDescription
deletionstring, one of retain, deleteretain (the default) keeps the store and its data when the resource that declares it is deleted, and delete removes them. An App applies the same choice when it drops the entry.
namestring, a DNS-1123 labelThe object's name. It takes the namespace and resource group of the resource that declares it.
ownerobject, Workflow.spec.buckets[].prefixes[].ownerThe one Function, Lake or Job that may write the database, in its namespace, named with its kind, besides the writers that a RolesAssignment names. In a database that a Function or a Job declares by name, it defaults to that workload, and in a Workflow's sql a Function owner names a step and a Lake owner a lake that the Workflow declares. A Lake writes no SQL, so a database a Lake owns is written by those writers only. With no owner, only those writers can write it.
quotaobject, Workflow.spec.buckets[].prefixes[].quotaA cap on the database's total size, the bytes of its pages in use. Once it is reached, an execute gets 507 unless each of its statements is a DELETE or a DROP. A change keeps the engine running.
refstring, a DNS-1123 labelThe name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field.
resourcesobject, Workflow.spec.lakes[].resourcesThe cpu and memory of the database's engine. An empty memory means 256Mi, and an empty cpu sets no cpu limit. A change replaces the running engine.

Workflow.spec.steps[]

FieldType and limitsDescription
builtinobject, Workflow.spec.steps[].builtinA step that funcd runs itself, with no Function: a wait or a pass. Exactly one of function, builtin and workflow.
dependsOnarray of string values, each a DNS-1123 labelThe steps this step follows; empty means the step listed before it, not counting the onFailure step. With one parent the step's input is that parent's output, with several an object of their outputs keyed by step name. Each name is another step, not the onFailure step, and the steps form no cycle.
functionobject, Workflow.spec.steps[].functionA step that calls a Function: one funcd creates from an image for this step, or an existing one by ref. Exactly one of function, builtin and workflow.
joinstring, one of all, anyHow the step waits on its parents: all, the default, runs it when every parent succeeded and skips it otherwise; any waits until every parent has ended, then runs it on the outputs of those that succeeded, or skips it if none did.
namestring, required, a DNS-1123 labelThe step's name, unique among the steps. dependsOn, onFailure, store owners and step.<name>.output in expressions refer to the step by it, and an image step's Function is named <workflow>-<step>.
paramsany JSON valueA JSON object merged over the step's input, its keys winning: a function step gets the result as its input, and a workflow step passes it to the child run. Its values must fit the step's input contract, and a field it sets need not come from a parent. A wait ignores it, and the onFailure step sets none.
whenobject, Workflow.spec.steps[].whenA condition the step runs on: when it is false, the step is Skipped, and so are the steps after it that need it to succeed. The onFailure step has none.
workflowobject, Workflow.spec.steps[].workflowA step that runs another Workflow as a child run: the step's input, params included, is the child's input, and the child's output is the step's output. A child that does not succeed fails the step, and a Workflow that reaches itself through such steps is never Ready. Exactly one of function, builtin and workflow.

Workflow.spec.steps[].builtin

FieldType and limitsDescription
passstringA ${{ }} JavaScript expression whose value is the step's output, over input, the run input, and step.<name>.output of each step it follows. It is checked only when the step runs: an error fails the step. Exactly one of wait and pass.
waitstringHow long the step waits before it succeeds with its input as its output: a duration such as 30s, checked at apply, or a ${{ }} expression that must yield one when the step runs. The wait counts toward the run's timeout, and a cancel ends it. Exactly one of wait and pass.

Workflow.spec.steps[].function

FieldType and limitsDescription
bindingsobject, Workflow.spec.steps[].function.bindingsWhat the step's code uses, copied onto an image step's Function: each store, lake, ConfigMap and Secret it names must be declared at the root of the Workflow or of its App. A ref step ignores it: the Function it names keeps its own.
imagestringThe artifact of the step's own Function, <workflow>-<step>, which funcd creates with the runtime the artifact declares and its handle export. That name must fit in 63 characters. Exactly one of image and ref.
poolingobject, Workflow.spec.poolingReplaces the Workflow's pooling for this step's Function, as a whole: a field it leaves unset takes its default, not the Workflow's value. A ref step ignores it.
refstring, a DNS-1123 labelThe name of an existing Function in the namespace that the step calls; funcd does not create or change it, and a run waits while it is missing. A Function whose protocol is http fails the step. Exactly one of image and ref.
retryobject, Workflow.spec.steps[].function.retryHow a failed call is tried again. A 5xx answer, a timeout or a transport error is retried, while a 4xx answer or an output over workflow.payloadLimit fails the step at once. Unset, the step gets workflow.defaultRetry attempts with workflow.defaultRetryBackoff; the onFailure step is called once.
timeoutstring, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)The per-step invocation bound: 0s to 24h; 0s or unset means workflow.defaultStepTimeout.

Workflow.spec.steps[].function.bindings

FieldType and limitsDescription
blobarray of Workflow.spec.lakes[].bindings.blob[]The Bucket prefixes the step's code reaches through ctx.blob, and over S3 while the S3 gateway is on, each under its alias; each Bucket must be declared at the root, in buckets. The binding grants reads; only the prefix's owner and the writers that a RolesAssignment names may write.
configarray of string values, each a DNS-1123 labelConfigMaps whose keys each worker of the step gets as environment variables when it starts; each must be declared at the root, in configMaps. A key that starts with FUNCD_, or that a bound Secret holds, is left out.
kvarray of Workflow.spec.steps[].function.bindings.kv[]The KV tables the step's code reaches through ctx.kv, each under its alias; each store must be declared at the root, in kv. The binding grants reads; only the table's owner and the writers that a RolesAssignment names may write.
lakearray of Workflow.spec.steps[].function.bindings.lake[]The Lakes the step's code queries, each under its alias; each must be declared at the root, in lakes. The step's Function waits until every bound Lake is Ready.
secretarray of string values, each a DNS-1123 labelSecrets whose keys the step's code reads through ctx.secret, on each read; each must be declared at the root, in secrets. No value reaches the worker's environment.
sqlarray of Workflow.spec.steps[].function.bindings.sql[]The SQLDatabases the step's code queries through ctx.sql, each under its alias; each must be declared at the root, in sql. The binding grants reads; only the database's owner and the writers that a RolesAssignment names may write.

Workflow.spec.steps[].function.bindings.kv[]

FieldType and limitsDescription
aliasstring, required, a DNS-1123 labelThe binding's name, unique in the list, which the code passes to ctx.kv.
storestring, required, a DNS-1123 labelThe KVStore, in the same namespace, that holds the table.
tablestring, required, a DNS-1123 labelThe table, by its name in the store's tables.

Workflow.spec.steps[].function.bindings.lake[]

FieldType and limitsDescription
aliasstring, required, a DNS-1123 labelThe binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE_<ALIAS>_URL and FUNCD_LAKE_<ALIAS>_TOKEN, the alias upper-cased.
lakestring, required, a DNS-1123 labelThe Lake to query, in the same namespace.

Workflow.spec.steps[].function.bindings.sql[]

FieldType and limitsDescription
aliasstring, required, a DNS-1123 labelThe binding's name, unique in the list, which the code passes to ctx.sql.
databasestring, required, a DNS-1123 labelThe SQLDatabase to query, in the same namespace.

Workflow.spec.steps[].function.retry

FieldType and limitsDescription
backoffstring, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)The base of the exponential retry backoff: 0s to 1h; 0s or unset means workflow.defaultRetryBackoff.
maxAttemptsinteger, 1 to 100How many calls the step may make, the first included: 1 means no retry. Unset means workflow.defaultRetry. A call that a funcd restart cuts runs again, even past this count.

Workflow.spec.steps[].when

FieldType and limitsDescription
conditionstring, requiredA ${{ }} JavaScript expression that yields true or false, over input, the run input, and step.<name>.output of each step it follows. It is type-checked against the steps' contracts before the Workflow is Ready; one that cannot be evaluated when the step is reached fails the run.

Workflow.spec.steps[].workflow

FieldType and limitsDescription
refstring, a DNS-1123 labelThe child Workflow's name, in the same namespace; it must be set. A run waits while the child is missing or not Ready, then runs it as it was when the run started.

Workflow.status

FieldType and limitsDescription
conditionsarray of ConditionThe conditions that explain the phase.
contractobject, Workflow.spec.contractThe run input and output schemas funcd derives once every step type-checks: the first step's input, and the output of the step that ends the run, or an object keyed by step name when several do. A new run's input is checked against it.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Deploying, Ready, Idle, Degraded, Failed, TerminatingWhere the object is in its lifecycle.
runsobject, Workflow.status.runsThe Workflow's runs: those not finished yet by name, and how many ended in each final phase.
stepsarray of Workflow.status.steps[]Each function and workflow step at the last type check, with its resolved image and its contract. A ref step whose Function is missing or serves HTTP has no entry.

Workflow.status.runs

FieldType and limitsDescription
activearray of string values, each a DNS-1123 labelThe runs not finished yet, newest first.
cancelledintegerThe number of runs that ended Cancelled since the Workflow was created. Deleting a run does not lower it.
failedintegerThe number of runs that ended Failed since the Workflow was created. Deleting a run does not lower it.
succeededintegerThe number of runs that ended Succeeded since the Workflow was created. Deleting a run does not lower it.

Workflow.status.steps[]

FieldType and limitsDescription
contractobject, Workflow.spec.contractThe step's input and output schemas: read from its image, or the child Workflow's status.contract for a workflow step.
imagestringThe image the step's contract comes from, as <image>@<digest> once it resolves to a digest: a ref step's Function's image, and workflow://<child> for a workflow step.
namestring, required, a DNS-1123 labelThe step's name.

WorkflowRun

apiVersion: funcd.io/v1alpha1
kind: WorkflowRun
metadata:
  name: orders-run-1
  namespace: default
  resourceGroup: rg1
spec:
  workflow: orders
  input:
    amount: 4
apiVersionkind
funcd.io/v1alpha1WorkflowRun

WorkflowRun.spec

FieldType and limitsDescription
cancelbooleanWhen true, the run is cancelled: nothing more starts, the calls in flight are closed and their late answers dropped, though a call may already have done its work, and the run ends Cancelled without calling its onFailure step. It wins over paused, a finished run ignores it, and funcdctl workflow cancel sets it.
inputany JSON valueThe run input: the first step receives it, and expressions read it as input. Over workflow.payloadLimit bytes, or off the input schema in the Workflow's status.contract, it is refused at apply or fails the run when it starts. It is fixed once the run is created; a replay sets none and takes its source's.
pausedbooleanWhen true, the run pauses: no step or retry starts, the calls in flight finish, and paused time does not count toward the run's timeout. A run created paused waits to start, and a finished run ignores it. funcdctl workflow pause and resume set and clear it.
replayobject, WorkflowRun.spec.replayStarts the run from a finished run, as funcdctl workflow replay does: replay.from and each step that depends on it run again, and the others keep the source's outputs. It is fixed once the run is created and leaves input empty; a source that cannot seed the run fails it, and its ReplaySeeded condition says why.
workflowstring, required, a DNS-1123 labelThe Workflow to run, in the run's namespace, fixed once the run is created. The run stays Pending while that Workflow, a child it calls or a step's Function is missing or not ready.

WorkflowRun.spec.replay

FieldType and limitsDescription
allowDriftbooleanLets the replay re-run an image step whose artifact digest changed since the source run, on the current artifact; a child workflow's steps count too. false, the default, fails the replay with DigestDrift instead.
fromstring, required, a DNS-1123 labelThe step to re-run from: it and every step that depends on it run again, a step the source never ran runs too, and the others keep the source's outputs. It is not the onFailure step, and no step outside that set may have failed or been cancelled in the source.
runstring, required, a DNS-1123 labelThe finished run to replay: a run of the same Workflow in this namespace that workflow.retention has not removed yet.

WorkflowRun.status

FieldType and limitsDescription
conditionsarray of ConditionThe conditions that explain the phase.
observedGenerationintegerThe generation of the spec that funcd last acted on.
phasestring, one of Pending, Running, Paused, Succeeded, Failed, CancelledWhere the run is in its lifecycle: empty before the run starts, Pending while it waits for its Workflow, a child it calls or a step's Function to be ready, Running while its steps run. Succeeded, Failed and Cancelled are final.
pinsarray of WorkflowRun.status.pins[]The Function revisions the run calls, pinned before it starts: one for each Function its steps call, ref targets and child workflows' steps included. Until the run ends or is cancelled, funcd keeps these revisions, and an edit to the Workflow or a Function does not change the code the run calls.
stepsarray of WorkflowRun.status.steps[]Each step of the run in spec order, the onFailure step included: its phase, attempts, times and error.
traceIdstringThe run's W3C trace ID, 32 lowercase hex characters, which every step call joins, a child workflow's included. funcdctl workflow logs reads the run's logs by it.
workflowUIDstringThe UID of the Workflow when the run started. A started run whose Workflow is deleted, or re-created under a new UID, is cancelled.

WorkflowRun.status.pins[]

FieldType and limitsDescription
functionstring, required, a DNS-1123 labelThe name of a Function the run's steps call.
functionUIDstring, requiredThat Function's UID when the run started: a Function re-created under the name is not the pinned one, and a step that calls it fails.
imageDigeststringThe digest of that Revision's image; empty for a file:// artifact, which has none.
revisionstring, required, a DNS-1123 labelThe Revision the run calls: the Function's current revision when the run started.

WorkflowRun.status.steps[]

FieldType and limitsDescription
attemptsintegerThe calls made to the step's Function, each carrying its number in the X-Funcd-Attempt header; 0 for a builtin or workflow step.
endedAtstring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the step succeeded, failed or was cancelled while running.
errorstringWhy the step failed, or that it was cancelled while running: the first line of the cause, cut at 512 bytes.
namestring, required, a DNS-1123 labelThe step's name.
phasestring, one of Pending, Running, Succeeded, Failed, Skipped, CancelledWhere the step is. It is Skipped when its when.condition is false, its join cannot be met or a step it depends on failed; a running step that a failure elsewhere stops goes back to Pending.
revisionstringThe step's image with the digest it resolved to when the run started; empty for a builtin or workflow step. A replay compares it to detect a changed artifact.
startedAtstring, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03
.965Z)
When the step started running.

HTTP API

The table lists each described operation of these kinds, with its method and path. The operation's page in the API reference gives its parameters, its body, its authentication and every answer, with when it happens and what to do.

MethodPathOperation
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowsList the Workflows of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowsCreate a Workflow
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflows/{name}Read a Workflow
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflows/{name}Replace a Workflow
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflows/{name}Delete a Workflow
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowrunsList the WorkflowRuns of a namespace
POST/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowrunsCreate a WorkflowRun
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowruns/{name}Read a WorkflowRun
PUT/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowruns/{name}Replace a WorkflowRun
DELETE/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowruns/{name}Delete a WorkflowRun
GET/apis/funcd.io/v1alpha1/namespaces/{namespace}/workflowruns/{name}/logsRead the logs of a WorkflowRun

On this page