# App and AppRevision spec

URL: /docs/develop/workloads/app/spec

Every field of App and AppRevision: its type, its limits and its description.

This page lists the spec and status fields of App and AppRevision, each with its type, its limits and its description. The [Platform page](/docs/platform/workloads/app.md) explains the concept, and the `metadata` of every kind is [the same](/docs/develop/common-definitions.md#objectmeta).

## App [#app]

```yaml
apiVersion: funcd.io/v1alpha1
kind: App
metadata:
  name: guestbook
  namespace: default
  resourceGroup: rg1
spec:
  version: 1.0.0
  kv:
    - name: guestbook-entries
      tables:
        - name: entries
          owner:
            kind: Function
            name: guestbook-api
  functions:
    - name: guestbook-api
      runtime: nodejs22
      handler: handle
      image: registry.example.com/guestbook-api:1.0.0
      bindings:
        kv:
          - alias: entries
            store: guestbook-entries
            table: entries
  routes:
    - name: guestbook-api
      rules:
        - path: /guestbook
          backend:
            function: guestbook-api
```

| apiVersion | kind |
| --- | --- |
| `funcd.io/v1alpha1` | `App` |

### `App.spec` [#appspec]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addons` | array of [`App.spec.addons[]`](#appspecaddons) | The objects of add-ons' kinds that the App declares or refers to; no two entries name the same one, whatever their kinds, since one name is one add-on object per namespace. An entry's kind is an Addon's, its config fits that Addon's schema, and each Secret it binds is one that the App's secrets declare. Its deletion is the object's own: what becomes of its engine's storage once it is deleted. |
| `backupSchedules` | array of [`App.spec.backupSchedules[]`](#appspecbackupschedules) | The BackupSchedules that the App declares or refers to; no two entries name the same one. An entry with an empty scope backs up this App: each object that its kv, buckets, sql and lakes entries name, and its Functions' local volumes. |
| `buckets` | array of [`App.spec.buckets[]`](#appspecbuckets) | The Buckets that the App declares or refers to; no two entries name the same one. A Bucket that an earlier App of this name kept is not this App's: refer to it with a ref entry, since declaring it by name stops the rollout with ChildNotOwned. |
| `configMaps` | array of [`App.spec.configMaps[]`](#appspecconfigmaps) | The ConfigMaps that the App defines or refers to, written before every other part; no two entries name the same one. A change to a defined entry's data writes a new ConfigMap, changes each part that names it to the new one, and prunes the old one with the other dropped parts. |
| `eventSources` | array of [`App.spec.eventSources[]`](#appspeceventsources) | The EventSources that the App declares or refers to; no two entries name the same one. |
| `functions` | array of [`App.spec.functions[]`](#appspecfunctions) | The Functions that the App declares or refers to; no two entries name the same one. An entry leaves kv, buckets, sql, lakes, configMaps and secrets empty, and each store, Lake, ConfigMap and Secret it binds is one that the App's lists of those names declare. A workflows step that sets function.image is written as a Function named &lt;workflow&gt;-&lt;step&gt;, a name no entry may declare. |
| `hooks` | object, [`App.spec.hooks`](#appspechooks) | Functions of this App that funcd calls for each new revision whose spec has them: preApply before the revision's parts change, postApply once it is current. Each call is recorded in the revision's status.hooks; a call that ends during a stop of funcd, a hold or a pause is not recorded and is made again, so a hook must be safe to repeat. |
| `jobs` | array of [`App.spec.jobs[]`](#appspecjobs) | The Jobs that the App declares or refers to; no two entries name the same one. An entry leaves kv, buckets, sql, lakes, configMaps and secrets empty, and each store, Lake, ConfigMap and Secret it binds is one that the App's lists of those names declare. A Job part is Ready when its Job is, and its runs count for nothing in the App's readiness: an upgrade waits for no run, and a run that has not ended keeps the revision it pinned. Deleting the App, or dropping the entry, deletes the Job, which ends its runs that have not ended as deleting a Job does. |
| `kv` | array of [`App.spec.kv[]`](#appspeckv) | The KVStores that the App declares or refers to; no two entries name the same one. A store that an earlier App of this name kept is not this App's: refer to it with a ref entry, since declaring it by name stops the rollout with ChildNotOwned. |
| `lakes` | array of [`App.spec.lakes[]`](#appspeclakes) | The Lakes that the App declares or refers to; no two entries name the same one. An entry leaves buckets, configMaps and secrets empty; each Bucket and Secret it binds is declared in the App's buckets and secrets. |
| `paused` | boolean | While true, funcd only sets the App's Paused condition: it creates no revision, writes or deletes no part and calls no hook. Changing it creates no revision, and a rollout in progress gets a full app.upgradeTimeout again on resume. An apply without it resumes the App; funcdctl app deploy and app rollback keep it as it is. |
| `requires` | array of [`App.spec.requires[]`](#appspecrequires) | The Apps of this namespace that this App needs. A new revision waits, with no time limit and no part written, until each one exists, is Ready with its spec rolled out and has a spec.version in the range. An App this one requires cannot be deleted, nor updated from inside the range to outside it once this App has started a rollout, and a requirement cycle is refused. |
| `routes` | array of [`App.spec.routes[]`](#appspecroutes) | The Routes that the App declares or refers to; no two entries name the same one, and none declares a Route under the name of a Site that sites declares, since each Site writes a Route of its own name. |
| `secrets` | array of [`App.spec.secrets[]`](#appspecsecrets) | The Secrets that the App's parts read and the keys they read, never their values; no two entries name the same one. An apply whose parts name an undeclared Secret is refused, and while a declared Secret or key is missing, funcd writes no part and reports SecretNotFound or SecretKeyMissing. A Secret that one of the App's Jobs owns may lack a key without that stop: each part that names it, other than that Job and the preApply hook Functions, is Lagging with SecretKeyMissing and is not written until the Job writes the key. |
| `sensors` | array of [`App.spec.sensors[]`](#appspecsensors) | The Sensors that the App declares or refers to; no two entries name the same one. |
| `sites` | array of [`App.spec.sites[]`](#appspecsites) | The Sites that the App declares or refers to; no two entries name the same one. An entry leaves buckets empty: the Site refers to the Bucket it serves, which the App's buckets declare or which exists already. Each declared Site writes a Route of its own name, which no routes entry may declare. |
| `sql` | array of [`App.spec.sql[]`](#appspecsql) | The SQLDatabases that the App declares or refers to; no two entries name the same one. A database that an earlier App of this name kept is not this App's: refer to it with a ref entry, since declaring it by name stops the rollout with ChildNotOwned. |
| `version` | string | A free label for this version of the App, shown by funcdctl app history and passed to the hooks; funcdctl app deploy sets it to the template's version. A range in another App's spec.requires matches it only when it is a SemVer 2.0.0 version, such as 1.4.0 with no v prefix. |
| `workflows` | array of [`App.spec.workflows[]`](#appspecworkflows) | The Workflows that the App declares or refers to; no two entries name the same one. An entry leaves kv, buckets, sql, lakes, configMaps and secrets empty, and each store, Lake, ConfigMap and Secret its steps bind is one that the App's lists of those names declare. A step that sets function.image is written as a Function named &lt;workflow&gt;-&lt;step&gt;, a name that no functions entry or other step may take. |

### `App.spec.addons[]` [#appspecaddons]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.addons[].bindings`](#appspecaddonsbindings) | What the object's engine uses, and what the Functions that funcd creates for the object from its kinds' images use. An object of a settings kind takes none, nor does one of an engineless kind whose Function is a ref. |
| `config` | any JSON value | The object's settings, which its kind's schema checks: the config schema of its Addon's kind entry when the object runs an engine, else the contract of the kind's Function. Unset is an empty object. |
| `deletion` | string, one of `retain`, `delete` | What becomes of the engine's storage once the object is deleted and its engine is gone: retain, the default, moves it into the quarantine for storage.quarantineRetention, from which it comes back by hand with funcd stopped; delete removes it. A new object of the same name starts empty either way. For an object of an Engineless kind, delete holds the object at its deletion, with metadata.deletionTimestamp set, until its Function answers ok to a call that carried it as deleting; retain lets it go at once, and the Function forgets it. |
| `functions` | array of [`App.spec.addons[].functions[]`](#appspecaddonsfunctions) | The object's own Function for a settings kind of its Addon, or for its own kind when that kind is Engineless, in place of the kind's function, so each copy of an App template applies its own objects. The objects it applies have no schema. A settings object names none. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | Exposes the engine at the edge, on ingress.host under its Addon's basePath, while the object is Ready. Its own ingress.auth alone decides the stance, open when unset; ingress.path and the authenticated mode are refused. An object of a settings or an engineless kind takes none. |
| `kind` | string | The add-on's kind: one that an Addon registers, as the Addon writes it. A ref entry leaves it unset. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The cpu and memory of the object's engine. An empty cpu or memory sets no limit, and a change replaces the running engine. An object of a settings or an engineless kind takes none. |

### `App.spec.addons[].bindings` [#appspecaddonsbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `job` | array of [`App.spec.addons[].bindings.job[]`](#appspecaddonsbindingsjob) | The Jobs whose runs the Function that funcd creates for an engineless object starts and reads, by their alias. Only an object of an engineless kind whose function is an image takes them. |
| `secret` | array of string values, each a DNS-1123 label | Secrets of the namespace whose keys, those that its Addon's kind entry lists in secretKeys, reach the engine's environment. funcd asks Cedar, as the object, for secret::read on each: a missing Secret holds the object in Pending with SecretNotFound, and a forbidden one with BindingResolveFailed. A changed value replaces the engine. The Functions that funcd creates for the object read every key of them. |

### `App.spec.addons[].bindings.job[]` [#appspecaddonsbindingsjob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The name that the code passes to ctx.job.start and ctx.job.get. Unique in the list. |
| `job` | string, required, a DNS-1123 label | A Job of the Function's namespace. While the Job is missing, a start on its alias answers 404, and a read still answers each run that a deleted Job left, until job.retention removes it. |

### `App.spec.addons[].functions[]` [#appspecaddonsfunctions]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required | A settings kind of the object's Addon, named once. |
| `ref` | string, required, a DNS-1123 label | A Function of the object's namespace that binds the object in its bindings.addon, which funcd calls with the object's settings objects of the kind. In an App, a Function the App declares. |

### `App.spec.addons[].ingress` [#appspecaddonsingress]

| Field | Type and limits | Description |
| --- | --- | --- |
| `auth` | object, [`App.spec.addons[].ingress.auth`](#appspecaddonsingressauth) | How 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. |
| `enabled` | boolean | Turns 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. |
| `host` | string | The exact host of the resource's own address. Empty is the namespace's host, &lt;namespace&gt;.&lt;server.baseDomain&gt;, or, in the default namespace, any host that no other namespace reserves. |
| `path` | string | The 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/&lt;name&gt;, /site/&lt;name&gt; or /lake/&lt;name&gt; by kind. |

### `App.spec.addons[].ingress.auth` [#appspecaddonsingressauth]

| Field | Type and limits | Description |
| --- | --- | --- |
| `mode` | string, one of `""`, `authenticated`, `open`, `oidc` | How 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. |
| `provider` | string, a DNS-1123 label | With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode. |
| `unauthenticated` | string, one of `""`, `redirect`, `401`, `allow` | With 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. |

### `App.spec.addons[].resources` [#appspecaddonsresources]

| Field | Type and limits | Description |
| --- | --- | --- |
| `cpu` | string | The 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. |
| `memory` | string | The 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. |

### `App.spec.backupSchedules[]` [#appspecbackupschedules]

| Field | Type and limits | Description |
| --- | --- | --- |
| `encryption` | object, [`App.spec.backupSchedules[].encryption`](#appspecbackupschedulesencryption) | The age recipients that seal the member files of each Backup. It is required: a schedule with fewer than 2 recipients is refused. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `paused` | boolean | While true, the schedule creates no Backup and rpoRisk stays false; a Backup created by hand still runs. Once it is false again, the slots missed meanwhile collapse into one Backup. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `schedule` | string | The cron slots at which the schedule creates a Backup: 5 fields (minute hour day-of-month month day-of-week) or a macro such as @daily, in timeZone. Slots missed during downtime, a pause or a hold collapse into one Backup, and a slot that comes while one of the schedule's Backups is Pending or Running creates none. |
| `scope` | object, [`App.spec.backupSchedules[].scope`](#appspecbackupschedulesscope) | The stores each Backup copies, in one form: the lists kvStores, buckets, lakes, databases, volumes and addons, or app, or resourceGroup. funcd resolves it at each run: a member or App it names that is missing then fails the Backup with reason MemberNotFound, and a scope of more than workloadBackup.maxCopyMembers members fails it with no copy written. In an App's spec.backupSchedules entry, an empty scope backs up that App. |
| `target` | object, [`App.spec.backupSchedules[].target`](#appspecbackupschedulestarget) | Where each Backup writes its copy: an S3 bucket and the Secret of its write key. |
| `timeZone` | string | The IANA time zone of schedule, such as Europe/Paris; UTC when empty. |
| `ttl` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | How long funcd keeps each Backup's record after its creation; 0s or unset means 720h. Only the record goes: the copy stays on the target until the target's own lifecycle rule expires it. A Backup may set a shorter spec.ttl, never a longer one. |

### `App.spec.backupSchedules[].encryption` [#appspecbackupschedulesencryption]

| Field | Type and limits | Description |
| --- | --- | --- |
| `recipients` | array of string values, required | The age recipients, each entry one recipient: at least 2 distinct ones, such as an owner's and a recovery one, all X25519 or all hybrid (age1pq1). Every member file of each Backup is sealed to all of them, so the identity of any one opens it. The copy's manifest.yaml, which names the members, their files' sizes and these recipients' fingerprints, is not sealed. |

### `App.spec.backupSchedules[].scope` [#appspecbackupschedulesscope]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addons` | array of string values, each a DNS-1123 label | Add-on objects of the namespace to copy, by name, whatever their kind, each once: each copy is the newest snapshot that the object's engine wrote under its Addon's snapshot.path, copied as it is. An object whose Addon declares no snapshot, or whose engine has written none yet, fails the Backup with reason NoSnapshot. |
| `app` | string, a DNS-1123 label | An App of the namespace: each Backup copies the stores of its kv, buckets, lakes and sql entries, ref entries included, and the local volumes of the Functions it declares. Set it alone, with no other scope field. |
| `buckets` | array of string values, each a DNS-1123 label | Buckets of the namespace to copy, by name, each once. A Bucket's copy holds none of the data of the Lakes located on its prefixes: each of them is copied as a member of its own. |
| `databases` | array of string values, each a DNS-1123 label | SQLDatabases of the namespace to copy, by name, each once. A database whose engine is not Ready fails the Backup with reason EngineNotReady. |
| `kvStores` | array of string values, each a DNS-1123 label | KVStores of the namespace to copy, by name, each once. |
| `lakes` | array of string values, each a DNS-1123 label | Lakes of the namespace to copy, by name, each once. A Lake located on a prefix of a listed Bucket is copied without being named here. A Lake that deletes files during each of a run's copies, as a busy one may, fails the Backup with reason LakeUnstable, and so does a Bucket that brings it in. |
| `resourceGroup` | string, a DNS-1123 label | A resource group of the namespace: each Backup copies its KVStores, Buckets, Lakes and SQLDatabases, and its add-on objects whose Addon declares a snapshot, but not its Functions' local volumes. Set it alone, with no other scope field. |
| `volumes` | array of string values | Local volumes of the namespace's Functions to copy, each as &lt;function&gt;/&lt;name&gt;, both DNS-1123 labels, and listed once. A volume is read live, file by file, so its copy is not a single point in time. |

### `App.spec.backupSchedules[].target` [#appspecbackupschedulestarget]

| Field | Type and limits | Description |
| --- | --- | --- |
| `credentialsSecret` | string, required, a DNS-1123 label | A Secret of the namespace with AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and, optionally, AWS_SESSION_TOKEN: the key each Backup writes with. It needs only put and list on the bucket. |
| `url` | string, required | The s3:// URL of the bucket that receives the copies, its options as query parameters, such as s3://backups?region=eu-west-3. The bucket of blob.target is refused, and another bucket on its endpoint is accepted with reason SameProvider on the schedule's Ready condition: one failure of that provider takes both. The bucket must accept a create-if-absent put (If-None-Match: \*): a bucket that refuses it fails each Backup with reason TargetUnconditional. |

### `App.spec.buckets[]` [#appspecbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.buckets[].prefixes[]` [#appspecbucketsprefixes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |
| `quota` | object, [`App.spec.buckets[].prefixes[].quota`](#appspecbucketsprefixesquota) | A 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. |

### `App.spec.buckets[].prefixes[].owner` [#appspecbucketsprefixesowner]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required, one of `Function`, `Lake`, `Job` | The 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. |
| `name` | string, required, a DNS-1123 label | The workload's name, in the object's namespace. |

### `App.spec.buckets[].prefixes[].quota` [#appspecbucketsprefixesquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxSize` | string, 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. |

### `App.spec.buckets[].quota` [#appspecbucketsquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxObjectBytes` | integer, at least 0 | The 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. |
| `maxSize` | string, 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. |

### `App.spec.configMaps[]` [#appspecconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.eventSources[]` [#appspeceventsources]

| Field | Type and limits | Description |
| --- | --- | --- |
| `blob` | object, [`App.spec.eventSources[].blob`](#appspeceventsourcesblob) | Events that fire on new and rewritten objects of a Bucket in this namespace, which funcd lists every eventing.blobPollInterval. A firing's data has the fields bucket, key, size, version and time, the object's modification time. Exactly one of timer, blob and sql. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `sql` | object, [`App.spec.eventSources[].sql`](#appspeceventsourcessql) | Events that fire on row changes in a SQLDatabase of this namespace. A firing's data has the fields op, table, rowId and index, and before, after and commitTimestamp when the change carries them; when before and after together pass 256 KiB, both are dropped and truncated is true. Exactly one of timer, blob and sql. |
| `timer` | object, [`App.spec.eventSources[].timer`](#appspeceventsourcestimer) | Events that fire on a schedule, each on its own interval or cron expression; a firing's data is an empty object. Exactly one of timer, blob and sql. |

### `App.spec.eventSources[].blob` [#appspeceventsourcesblob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, required, a DNS-1123 label | The Bucket, in this namespace, whose objects fire the events. Until it exists, the source is not Ready, with reason BucketNotFound, and watches nothing. |
| `events` | array of [`App.spec.eventSources[].blob.events[]`](#appspeceventsourcesblobevents), required | The source's events: at least one, with unique names, each watching the objects under its prefix. |

### `App.spec.eventSources[].blob.events[]` [#appspeceventsourcesblobevents]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names. |
| `on` | array of string values | The object changes that fire the event. Created, the only one, fires for each new object and again when an object is rewritten with another size or modification time; empty means Created. |
| `prefix` | string | The key prefix the event watches: only objects whose key starts with it fire, and empty means the whole Bucket. When the source is created or this prefix changes, the objects already under it fire too, to the Sensors subscribed then: an object that no Sensor got counts as seen. |

### `App.spec.eventSources[].sql` [#appspeceventsourcessql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `database` | string, required, a DNS-1123 label | The SQLDatabase, in this namespace, whose row changes fire the events. Until it exists, the source is not Ready, with reason DatabaseNotFound. |
| `events` | array of [`App.spec.eventSources[].sql.events[]`](#appspeceventsourcessqlevents), required | The source's events: at least one, with unique names, each watching one table. |

### `App.spec.eventSources[].sql.events[]` [#appspeceventsourcessqlevents]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names. |
| `on` | array of string values | The row changes that fire the event: Insert, Update or Delete. Empty means all three. |
| `table` | string, required | The table whose row changes fire the event, matched by its exact name, case included. |

### `App.spec.eventSources[].timer` [#appspeceventsourcestimer]

| Field | Type and limits | Description |
| --- | --- | --- |
| `events` | array of [`App.spec.eventSources[].timer.events[]`](#appspeceventsourcestimerevents), required | The timer's events: at least one, with unique names, each firing on its own schedule. |

### `App.spec.eventSources[].timer.events[]` [#appspeceventsourcestimerevents]

| Field | Type and limits | Description |
| --- | --- | --- |
| `cron` | string | A cron expression: 5 fields (minute hour day-of-month month day-of-week) or a macro such as @daily. Exactly one of interval and cron. |
| `interval` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | The tick period: 100ms to 24h. Exactly one of interval and cron. |
| `name` | string, required, a DNS-1123 label | The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names. |
| `timeZone` | string | The IANA time zone of cron, such as Europe/Paris; UTC when empty. Only with cron. |

### `App.spec.functions[]` [#appspecfunctions]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.functions[].bindings`](#appspecfunctionsbindings) | What the code may use: KV tables, Bucket prefixes, SQL databases, Lakes and other Functions, each under an alias, and ConfigMaps and Secrets. A binding is the grant: a call on an alias with no binding is refused with 403. Each store, Lake, ConfigMap and Secret it names must be declared at the root, in this spec's kv, buckets, sql, lakes, configMaps or secrets, or in the App's for an App's part. |
| `buckets` | array of [`App.spec.functions[].buckets[]`](#appspecfunctionsbuckets) | The Buckets the Function declares: by name it creates and owns one, and a Bucket of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.blob binds only a declared Bucket, and a prefix with no owner gets the Function as its owner. An App's part declares none and binds those that the App declares. |
| `configMaps` | array of [`App.spec.functions[].configMaps[]`](#appspecfunctionsconfigmaps) | The ConfigMaps the Function declares: by name it defines one from its data, which goes with the Function, by ref it uses an existing one. spec.bindings.config binds only a declared ConfigMap, and a defined one that the spec no longer defines is deleted once the Function is Ready again and nothing else names it. An App's part declares none. |
| `handler` | string, matching `^[A-Za-z_][A-Za-z0-9_.]*$` | The name of the export that the shim calls in the code, such as handle. A Function without one, or whose code has no such export, fails with ShapeInvalid. |
| `image` | string | The OCI reference of the code's artifact: a registry reference with a tag or a digest, or an oci-layout:// reference to a layout on the server's disk. A Function whose image is missing, or cannot be resolved or pulled, starts no worker. |
| `imageDigest` | string, a sha256 digest | The sha256 digest that funcd pulls the image by and checks it against. Unset, funcd resolves the image to its digest when it creates the Revision of a new spec and keeps that digest, so a tag that moves later changes nothing. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | The Function's own address at the edge. With no host and no path, it answers by name at /function/&lt;name&gt;; a host or a path gives it a Route of its own in place of that address, which its IngressReady condition reports. Its path may not be /function or under it. |
| `kv` | array of [`App.spec.functions[].kv[]`](#appspecfunctionskv) | The KVStores the Function declares: by name it creates and owns one, and a store of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.kv binds only a declared store. An App's part declares none and binds those that the App declares. |
| `lakes` | array of [`App.spec.functions[].lakes[]`](#appspecfunctionslakes) | The Lakes the Function declares: by name it creates one that goes with the Function, by ref it uses an existing one. spec.bindings.lake binds only a declared Lake, and a Lake declared by name declares nothing at its own root: it binds the Function's buckets, configMaps and secrets. An App's part declares none. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `pooling` | object, [`App.spec.functions[].pooling`](#appspecfunctionspooling) | Whether the Function shares a worker with other Functions; unset, it runs in workers of its own. |
| `protocol` | string, one of `""`, `cloudevent`, `http` | How funcd calls the code. cloudevent, the default, passes each call to the handler as a CloudEvent. http passes each edge request to the handler, an http(app) export: only the edge and another Function's ctx.fetch over a link reach it, and it needs a node runtime and no pooling.worker. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `replicas` | integer, 0 to 15 | How many workers run while the Function is awake: at least 1 once a call wakes it, and at least scaling.minReplicas. Every call goes to the lowest listening replica, and the others are spares. With minReplicas 0, replicas above 0 also starts workers before the first call, but not after a sleep. A local volume allows at most 1. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The CPU and memory caps of each of the Function's workers; a field left empty takes functions.defaultResources. Only the containerd runtime enforces them, and they cannot be set with pooling.worker. |
| `runtime` | string, a DNS-1123 label | The runtime that runs the code, such as nodejs22 or python314, or one that an Addon ships for Functions. A Function without one fails with ShapeInvalid, and one whose runtime this node cannot run fails with RuntimeUnavailable. |
| `scaling` | object, [`App.spec.functions[].scaling`](#appspecfunctionsscaling) | Scale to zero: with minReplicas 0, the default, and an idleTimeout, a Function with no traffic goes Idle and its workers stop until the next call wakes it. |
| `secrets` | array of [`App.spec.functions[].secrets[]`](#appspecfunctionssecrets) | The Secrets of the namespace that the bindings may name, each with the keys the code reads; spec.bindings.secret names only a declared Secret. The Function waits in Pending, with SecretNotFound or SecretKeyMissing, until each one exists with every declared key. An App's part declares none and binds those that the App declares. |
| `sql` | array of [`App.spec.functions[].sql[]`](#appspecfunctionssql) | The SQLDatabases the Function declares: by name it creates and owns one, and a database of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.sql binds only a declared database, and a database with no owner gets the Function as its owner. An App's part declares none and binds those that the App declares. |
| `timeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | Bounds an external invoke until its response starts: 0s to 1h; 0s or unset means invoke.defaultTimeout. |
| `volumes` | array of [`App.spec.functions[].volumes[]`](#appspecfunctionsvolumes) | The directories the Function's workers mount. Apply refuses a Function with one unless runtime.mode is containerd and volumes.capacity or volumes.capacityBytes is set. A Function with a volume runs solo, even with pooling.worker. |

### `App.spec.functions[].bindings` [#appspecfunctionsbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addon` | array of [`App.spec.functions[].bindings.addon[]`](#appspecfunctionsbindingsaddon) | The add-on objects whose engines the code calls, each under its alias: through ctx.addon.fetch, or with any HTTP client at FUNCD_ADDON\_&lt;ALIAS&gt;\_URL with the header X-Funcd-Addon-Token set to FUNCD_ADDON\_&lt;ALIAS&gt;\_TOKEN. Each call goes through funcd, which asks Cedar for addon::call and serves only the paths that the object's edge entry serves. |
| `blob` | array of [`App.spec.functions[].bindings.blob[]`](#appspecfunctionsbindingsblob) | The Bucket prefixes the code reaches through ctx.blob, and over S3 while the S3 gateway is on, each under its alias. The binding grants reads; only the prefix's owner and the writers that a RolesAssignment names may write. A Bucket or prefix that does not exist yet holds the Function in Pending with BucketNotFound. |
| `config` | array of string values, each a DNS-1123 label | ConfigMaps whose keys each worker gets as environment variables when it starts, a later ConfigMap's value winning for a key that both hold. A key that starts with FUNCD\_, or that a bound Secret holds, is left out; 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 a ConfigMap's. A missing ConfigMap holds the Function Failed with ConfigResolveFailed. |
| `job` | array of [`App.spec.addons[].bindings.job[]`](#appspecaddonsbindingsjob) | The Jobs whose runs the code starts with ctx.job.start and reads with ctx.job.get, each under its alias. The binding grants both, and a namespace Policy that forbids job::start or job::read to the Function revokes one. A run that the code starts passes the checks of a run that a person starts, and a Job's own spec refuses this list. |
| `kv` | array of [`App.spec.functions[].bindings.kv[]`](#appspecfunctionsbindingskv) | The KV tables the code reaches through ctx.kv, each under its alias. The binding grants reads; only the table's owner and the writers that a RolesAssignment names may write. A store or table that does not exist yet holds the Function in Pending with KVStoreNotFound. |
| `lake` | array of [`App.spec.functions[].bindings.lake[]`](#appspecfunctionsbindingslake) | The Lakes the code queries, each under its alias. The Function waits in Pending with LakeNotReady until every bound Lake is Ready. |
| `links` | array of [`App.spec.functions[].bindings.links[]`](#appspecfunctionsbindingslinks) | The Functions the code calls, each under its alias: through ctx.invoke one whose protocol is cloudevent, through ctx.fetch one whose protocol is http. Each target must exist in the namespace when this Function is applied, the namespace's links form no cycle, and a Function that a link targets cannot be deleted until the link goes. |
| `secret` | array of string values, each a DNS-1123 label | Secrets whose keys the code reads through ctx.secret, on each read and with no cache, a later Secret's value winning for a key that both hold. No value reaches the worker's environment. No worker starts while a bound Secret is missing, and a worker whose Function a Policy forbids to read one is not ready. |
| `sql` | array of [`App.spec.functions[].bindings.sql[]`](#appspecfunctionsbindingssql) | The SQLDatabases the code queries through ctx.sql, each under its alias. The binding grants reads; only the database's owner and the writers that a RolesAssignment names may write. A database that does not exist yet holds the Function in Pending with SQLDatabaseNotFound. |

### `App.spec.functions[].bindings.addon[]` [#appspecfunctionsbindingsaddon]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The name the handler calls the object by: ctx.addon.fetch takes it, and the worker gets FUNCD_ADDON\_&lt;ALIAS&gt;\_URL and FUNCD_ADDON\_&lt;ALIAS&gt;\_TOKEN for an HTTP SDK. Unique in the list. |
| `object` | string, required, a DNS-1123 label | An add-on object of the Function's namespace, declared by its App when an App holds the Function. A missing one holds the Function in Pending with AddonObjectNotFound. |

### `App.spec.functions[].bindings.blob[]` [#appspecfunctionsbindingsblob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it. |
| `bucket` | string, required, a DNS-1123 label | The Bucket, in the same namespace, that holds the prefix. |
| `prefix` | string, required, a DNS-1123 label | The prefix, by its name in the Bucket's prefixes. |

### `App.spec.functions[].bindings.kv[]` [#appspecfunctionsbindingskv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list, which the code passes to ctx.kv. |
| `store` | string, required, a DNS-1123 label | The KVStore, in the same namespace, that holds the table. |
| `table` | string, required, a DNS-1123 label | The table, by its name in the store's tables. |

### `App.spec.functions[].bindings.lake[]` [#appspecfunctionsbindingslake]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE\_&lt;ALIAS&gt;\_URL and FUNCD_LAKE\_&lt;ALIAS&gt;\_TOKEN, the alias upper-cased. |
| `lake` | string, required, a DNS-1123 label | The Lake to query, in the same namespace. |

### `App.spec.functions[].bindings.links[]` [#appspecfunctionsbindingslinks]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The link's name, unique in the list, which the code passes to ctx.invoke or ctx.fetch. |
| `target` | string, required, a DNS-1123 label | The Function to call, in the same namespace. |
| `timeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | Bounds the synchronous call, a cold-start wake included: 0s to 5m; 0s or unset means the 30s link default. |

### `App.spec.functions[].bindings.sql[]` [#appspecfunctionsbindingssql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `alias` | string, required, a DNS-1123 label | The binding's name, unique in the list, which the code passes to ctx.sql. |
| `database` | string, required, a DNS-1123 label | The SQLDatabase to query, in the same namespace. |

### `App.spec.functions[].buckets[]` [#appspecfunctionsbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.functions[].configMaps[]` [#appspecfunctionsconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.functions[].kv[]` [#appspecfunctionskv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `quota` | object, [`App.spec.functions[].kv[].quota`](#appspecfunctionskvquota) | Caps on the store's total size, on each value and on each key. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `tables` | array of [`App.spec.functions[].kv[].tables[]`](#appspecfunctionskvtables) | 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. |

### `App.spec.functions[].kv[].quota` [#appspecfunctionskvquota]

| Field | Type and limits | Description |
| --- | --- | --- |
| `maxBytes` | integer, at least 0 | The same cap as a number of bytes. Set maxSize or maxBytes, not both. |
| `maxKeyBytes` | integer, 0 to 64000 | The longest key, in bytes. 0 means 1024 (1 KiB). |
| `maxSize` | string, 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. |
| `maxValueBytes` | integer, 0 to 1048576 | The largest value a write may store, in bytes. 0 means 1048576 (1 MiB). |

### `App.spec.functions[].kv[].tables[]` [#appspecfunctionskvtables]

| Field | Type and limits | Description |
| --- | --- | --- |
| `name` | string, required, a DNS-1123 label | The table's name, unique within the store. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |

### `App.spec.functions[].lakes[]` [#appspecfunctionslakes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.functions[].lakes[].bindings`](#appspecfunctionslakesbindings) | What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment. |
| `buckets` | array of [`App.spec.functions[].lakes[].buckets[]`](#appspecfunctionslakesbuckets) | 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. |
| `configMaps` | array of [`App.spec.functions[].lakes[].configMaps[]`](#appspecfunctionslakesconfigmaps) | 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. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/&lt;name&gt;, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself. |
| `location` | object, [`App.spec.functions[].lakes[].location`](#appspecfunctionslakeslocation) | The 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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |
| `secrets` | array of [`App.spec.functions[].lakes[].secrets[]`](#appspecfunctionslakessecrets) | 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. |

### `App.spec.functions[].lakes[].bindings` [#appspecfunctionslakesbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `blob` | array of [`App.spec.functions[].bindings.blob[]`](#appspecfunctionsbindingsblob), required | The 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. |
| `config` | array of string values, each a DNS-1123 label | ConfigMaps 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. |
| `secret` | array of string values, each a DNS-1123 label | Secrets 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. |

### `App.spec.functions[].lakes[].buckets[]` [#appspecfunctionslakesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.functions[].lakes[].configMaps[]` [#appspecfunctionslakesconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.functions[].lakes[].location` [#appspecfunctionslakeslocation]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, required, a DNS-1123 label | A Bucket of the same namespace. |
| `prefix` | string, required, a DNS-1123 label | A prefix of that Bucket. |

### `App.spec.functions[].lakes[].secrets[]` [#appspecfunctionslakessecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.functions[].pooling` [#appspecfunctionspooling]

| Field | Type and limits | Description |
| --- | --- | --- |
| `worker` | string | A worker id, a DNS-1123 label: Functions of the namespace that name it, run the same runtime, are in the same resource group and have the same bindings, owned data and grants share one worker, which status.pool names. Empty, the default, runs the Function solo. Only the process runtime pools, for node runtimes and, when the server's Python is 3.14 or later, python ones; anywhere else the Function runs solo too. A pool takes the first 16 Functions by name, and the others wait in Pending with PoolFull. |

### `App.spec.functions[].scaling` [#appspecfunctionsscaling]

| Field | Type and limits | Description |
| --- | --- | --- |
| `idleTimeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | The idle time before a worker is reclaimed: 0s to 24h; 0s or unset disables reclaim. |
| `maxReplicas` | integer, 0 to 15 | Above 0, the most that minReplicas may be; 0, the default, sets no bound. It starts no worker: replicas and minReplicas alone decide how many run. |
| `minReplicas` | integer, 0 to 15 | The fewest workers the Function keeps. 0, the default, lets idleTimeout scale it to zero; above 0, it never sleeps. It may not exceed maxReplicas when that is above 0, and a local volume allows at most 1. |

### `App.spec.functions[].secrets[]` [#appspecfunctionssecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.functions[].sql[]` [#appspecfunctionssql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |
| `quota` | object, [`App.spec.buckets[].prefixes[].quota`](#appspecbucketsprefixesquota) | A 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |

### `App.spec.functions[].volumes[]` [#appspecfunctionsvolumes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | Only for a local volume declared by name: retain, the default, keeps the volume and its files with no owner when the Function drops it or is deleted, so that a ref can take it again; delete removes them. |
| `name` | string, a DNS-1123 label | The volume's name, unique in the list; set name or ref, not both. The code reads the directory's path from FUNCD_VOLUME\_&lt;NAME&gt;, the name or ref upper-cased. |
| `ref` | string, a DNS-1123 label | Instead of name: a retained local volume that this Function, or an earlier Function of the same name, dropped with retain, and that the Function takes over; with no such volume, it waits in Pending with VolumeNotFound. Only a local volume takes a ref; it sets no deletion and states the retained volume's own size, since apply refuses another size. |
| `size` | string, a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB) | The volume's size, the most its directory may hold, above zero; set size or sizeBytes, not both. Apply refuses a local volume whose size changes, or that does not fit both the capacity that volumes.capacity or volumes.capacityBytes sets and the namespace's spec.volumeBudget. |
| `sizeBytes` | integer, at least 1 | The same size as a number of bytes. Set size or sizeBytes, not both. |
| `type` | string, required, one of `emptyDir`, `local` | emptyDir is a new empty directory for each worker, removed with it; local is one durable directory that keeps its files through a crash, a redeploy and a scale to zero. A Function with a local volume runs at most 1 replica, and while it redeploys, its old and new workers hold the volume at once. |

### `App.spec.hooks` [#appspechooks]

| Field | Type and limits | Description |
| --- | --- | --- |
| `postApply` | array of [`App.spec.hooks.postApply[]`](#appspechookspostapply) | Called in order, one at a time, once the revision is current, with no deadline. A failed call makes the App Degraded with HookFailed and holds the later post-hooks until funcdctl app retry calls it again; dropped parts are deleted only once every post-hook has succeeded. |
| `preApply` | array of [`App.spec.hooks.postApply[]`](#appspechookspostapply) | Called in order, one at a time, before the revision's other parts change: until all have succeeded, funcd writes only the pre-hook Functions and what they bind. A failed call fails the revision with HookFailed, and funcdctl app retry calls it again; a pre-hook whose Function or SQL database is not ready when app.upgradeTimeout runs out fails it too. A pre-hook may not link to a functions entry that is neither a ref entry nor a pre-hook, which is written after them. |

### `App.spec.hooks.postApply[]` [#appspechookspostapply]

| Field | Type and limits | Description |
| --- | --- | --- |
| `function` | string, required, a DNS-1123 label | The name of a functions entry of this App, not a ref entry, at most once per list. funcd calls it with a CloudEvent whose type is the list's name and whose data is the revision's spec.hookInput. The call fails on an answer of 400 or more, on a Function with protocol http, or when no answer starts within the Function's spec.timeout, else invoke.defaultTimeout, its wake included. |

### `App.spec.jobs[]` [#appspecjobs]

| Field | Type and limits | Description |
| --- | --- | --- |
| `approval` | object, [`App.spec.jobs[].approval`](#appspecjobsapproval) | Whether a run waits for a person's approval of its preview before it runs. Unset, every run previews and waits. |
| `bindings` | object, [`App.spec.functions[].bindings`](#appspecfunctionsbindings) | What the code may use: KV tables, Bucket prefixes, SQL databases, Lakes and Functions, each under an alias, and ConfigMaps and Secrets. A binding is the grant: a call on an alias with no binding is refused with 403. Each store, Lake, ConfigMap and Secret it names must be declared at the root, in this spec's kv, buckets, sql, lakes, configMaps or secrets. |
| `buckets` | array of [`App.spec.jobs[].buckets[]`](#appspecjobsbuckets) | The Buckets the Job declares: by name it creates and owns one, and a Bucket of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.blob binds only a declared Bucket. |
| `concurrency` | integer, 1 to 15 | How many of the Job's runs may hold a worker at once, those Previewing included: 1 to 15; unset means 1, and a local volume allows only 1. A run past it waits in Pending with Queued. |
| `configMaps` | array of [`App.spec.jobs[].configMaps[]`](#appspecjobsconfigmaps) | The ConfigMaps the Job declares: by name it defines one from its data, which goes with the Job, by ref it uses an existing one. spec.bindings.config binds only a declared ConfigMap. |
| `handler` | string, matching `^[A-Za-z_][A-Za-z0-9_.]*$` | The name of the export that the shim calls once for each run, such as handle. A Job without one, or whose code has no such export, is not Ready, with ShapeInvalid. |
| `image` | string | The OCI reference of the code's artifact: a registry reference with a tag or a digest, or an oci-layout:// reference to a layout on the server's disk. A Job whose image is missing, or cannot be resolved or pulled, starts no run. |
| `imageDigest` | string, a sha256 digest | The sha256 digest that funcd pulls the image by and checks it against. Unset, funcd resolves the image to its digest when it creates the Revision of a new spec and keeps that digest, so a tag that moves later changes nothing. |
| `kv` | array of [`App.spec.jobs[].kv[]`](#appspecjobskv) | The KVStores the Job declares: by name it creates and owns one, and a store of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.kv binds only a declared store. |
| `lakes` | array of [`App.spec.jobs[].lakes[]`](#appspecjobslakes) | The Lakes the Job declares: by name it creates one that goes with the Job, by ref it uses an existing one. spec.bindings.lake binds only a declared Lake, and a Lake declared by name declares nothing at its own root: it binds the Job's buckets, configMaps and secrets. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The CPU and memory caps of each run's worker; a field left empty takes functions.defaultResources. Only the containerd runtime enforces them. |
| `runtime` | string, a DNS-1123 label | The runtime that runs the code, such as nodejs22 or python314, or one that an Addon ships for Jobs. A Job without one is not Ready, with ShapeInvalid, and one whose runtime this node cannot run is not Ready, with RuntimeUnavailable. |
| `secrets` | array of [`App.spec.jobs[].secrets[]`](#appspecjobssecrets) | The Secrets of the namespace that the bindings may name, each with the keys the code reads; spec.bindings.secret names only a declared Secret. The Job waits in Pending, with SecretNotFound or SecretKeyMissing, until each one exists with every declared key. |
| `sql` | array of [`App.spec.jobs[].sql[]`](#appspecjobssql) | The SQLDatabases the Job declares: by name it creates and owns one, and a database of that name that it does not own holds it in Pending with StoreNotOwned; by ref it uses an existing one. spec.bindings.sql binds only a declared database. |
| `timeout` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | The bound on each call of a run's handler, its preview's and its apply's, from its worker's start: 0s to 168h; 0s or unset means none. A run past it ends Failed with RunTimedOut, and its worker stops. |
| `volumes` | array of [`App.spec.functions[].volumes[]`](#appspecfunctionsvolumes) | The directories each run's worker mounts. Apply refuses a Job with one unless runtime.mode is containerd and volumes.capacity or volumes.capacityBytes is set. A local volume is the Job's own, never a same-named Function's, and allows a concurrency of at most 1. |

### `App.spec.jobs[].approval` [#appspecjobsapproval]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bypass` | boolean | When true, a run runs at once, with no preview and no approval. Unset or false, a run first calls the code's preview, then waits in AwaitingApproval until a person approves or rejects it. A Job for unattended work sets it. |
| `expiry` | string, a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms) | How long a preview stays valid for its approval: 1m to 168h; unset means 24h. A preview older than this when it is approved, or when its run's slot frees after the approval, is previewed again: the run runs when the new preview is the same document, and waits for a new approval when it differs. |

### `App.spec.jobs[].buckets[]` [#appspecjobsbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.jobs[].configMaps[]` [#appspecjobsconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.jobs[].kv[]` [#appspecjobskv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `quota` | object, [`App.spec.functions[].kv[].quota`](#appspecfunctionskvquota) | Caps on the store's total size, on each value and on each key. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `tables` | array of [`App.spec.functions[].kv[].tables[]`](#appspecfunctionskvtables) | 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. |

### `App.spec.jobs[].lakes[]` [#appspecjobslakes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.functions[].lakes[].bindings`](#appspecfunctionslakesbindings) | What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment. |
| `buckets` | array of [`App.spec.jobs[].lakes[].buckets[]`](#appspecjobslakesbuckets) | 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. |
| `configMaps` | array of [`App.spec.jobs[].lakes[].configMaps[]`](#appspecjobslakesconfigmaps) | 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. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/&lt;name&gt;, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself. |
| `location` | object, [`App.spec.functions[].lakes[].location`](#appspecfunctionslakeslocation) | The 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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |
| `secrets` | array of [`App.spec.jobs[].lakes[].secrets[]`](#appspecjobslakessecrets) | 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. |

### `App.spec.jobs[].lakes[].buckets[]` [#appspecjobslakesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.jobs[].lakes[].configMaps[]` [#appspecjobslakesconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.jobs[].lakes[].secrets[]` [#appspecjobslakessecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.jobs[].secrets[]` [#appspecjobssecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.jobs[].sql[]` [#appspecjobssql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |
| `quota` | object, [`App.spec.buckets[].prefixes[].quota`](#appspecbucketsprefixesquota) | A 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |

### `App.spec.kv[]` [#appspeckv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `quota` | object, [`App.spec.functions[].kv[].quota`](#appspecfunctionskvquota) | Caps on the store's total size, on each value and on each key. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `tables` | array of [`App.spec.functions[].kv[].tables[]`](#appspecfunctionskvtables) | 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. |

### `App.spec.lakes[]` [#appspeclakes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.functions[].lakes[].bindings`](#appspecfunctionslakesbindings) | What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment. |
| `buckets` | array of [`App.spec.lakes[].buckets[]`](#appspeclakesbuckets) | 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. |
| `configMaps` | array of [`App.spec.lakes[].configMaps[]`](#appspeclakesconfigmaps) | 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. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/&lt;name&gt;, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself. |
| `location` | object, [`App.spec.functions[].lakes[].location`](#appspecfunctionslakeslocation) | The 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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |
| `secrets` | array of [`App.spec.lakes[].secrets[]`](#appspeclakessecrets) | 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. |

### `App.spec.lakes[].buckets[]` [#appspeclakesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.lakes[].configMaps[]` [#appspeclakesconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.lakes[].secrets[]` [#appspeclakessecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.requires[]` [#appspecrequires]

| Field | Type and limits | Description |
| --- | --- | --- |
| `app` | string, required, a DNS-1123 label | The name of an App of this namespace that this App needs; no two entries name the same App. It need not exist yet: the revision waits for it. |
| `version` | string | An npm-style version range, such as ^2.0.0, that the required App's spec.version must be in; empty accepts any version, even none. A range matches only a SemVer 2.0.0 version, and a prerelease only when the range holds one. |

### `App.spec.routes[]` [#appspecroutes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `auth` | object, [`App.spec.addons[].ingress.auth`](#appspecaddonsingressauth) | The edge authentication of the rules that set none. Unset uses the Namespace's spec.edgeDefaults.auth, else open. |
| `enabled` | boolean | false turns the Route off: it serves nothing, leaves its paths to other Routes and reports Disabled. Unset is true, except on a Route that a Site or a Function owns in a namespace whose defaultExposure is explicit. |
| `host` | string | The host the rules answer on, matched in lower case and without a port or a trailing dot. Empty is the namespace host, &lt;namespace&gt;.&lt;server.baseDomain&gt;, or, in the default namespace, every host except another namespace's own host, &lt;other&gt;.&lt;server.baseDomain&gt; or a name under it, while that namespace uses it; a host that another namespace's Route names is not excluded, and the longer matching path wins there. In the default namespace, an explicit defaultExposure refuses an empty host (HostRequired). A host that names another namespace, &lt;other&gt;.&lt;server.baseDomain&gt; or a name under it, is refused (HostReserved) while that namespace uses it, and always for a rule at or under /function. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `rules` | array of [`App.spec.routes[].rules[]`](#appspecroutesrules) | The path rules, at least one; two rules may not have the same path and the same methods. Across all Routes, the longest matching path wins, and a rule with a host wins a tie. A Route serves all its rules or none: a missing backend or one conflicting rule keeps every rule off. |

### `App.spec.routes[].rules[]` [#appspecroutesrules]

| Field | Type and limits | Description |
| --- | --- | --- |
| `auth` | object, [`App.spec.addons[].ingress.auth`](#appspecaddonsingressauth) | The edge authentication of this rule's requests. Unset uses the Route's auth, then the Namespace's spec.edgeDefaults.auth, then open. |
| `backend` | object, [`App.spec.routes[].rules[].backend`](#appspecroutesrulesbackend), required | What the rule serves: set exactly one of function, static and site. |
| `methods` | array of string values, each one of `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS` | The request methods the rule matches; empty matches every method. |
| `path` | string, required | The path the rule matches, starting with /. In the default namespace, a Route with no host may not have a rule at or under /function, the path that calls Functions by name (ReservedPath). |
| `pathType` | string, one of `""`, `Prefix`, `Exact` | Prefix, the default, matches path and every path under it by whole segments, so /api matches /api/x but not /apix; a trailing slash changes nothing, and / matches every path. Exact matches path alone. The backend receives the rest of the path, or / for an Exact rule. |

### `App.spec.routes[].rules[].backend` [#appspecroutesrulesbackend]

| Field | Type and limits | Description |
| --- | --- | --- |
| `function` | string, a DNS-1123 label | A Function of the Route's namespace that the rule calls; the Route is not Ready (BackendNotFound) while it is missing. A request whose rest of the path lies under /health/ gets 404 and reaches no worker. |
| `site` | string, a DNS-1123 label | A Site of this Route's namespace: the rule serves the build that Site serves now, and its config.json at &lt;path&gt;/config.json, following each new build. A Prefix rule; the Route may not carry the Site's own name. |
| `static` | object, [`App.spec.routes[].rules[].backend.static`](#appspecroutesrulesbackendstatic) | Serves the objects of a Bucket prefix directly, with no Function. It answers GET and HEAD, and 405 to any other method. |

### `App.spec.routes[].rules[].backend.static` [#appspecroutesrulesbackendstatic]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, required, a DNS-1123 label | A Bucket of the Route's namespace whose objects the rule serves; the Route is not Ready (BucketNotFound) while it is missing. |
| `index` | string | The object, relative to prefix, served at the rule's root; index.html when empty. A path ending in / gets the file of the index's name in that folder. It may not start with /. |
| `prefix` | string | The key prefix in the Bucket that the rule serves, ending in /; empty serves the whole Bucket. A request reads the object at this prefix plus the rest of its path. |
| `spa` | boolean | Serve the index, with 200, for a path that matches no object, so that a client-side router handles it; when false, such a path gets 404. |

### `App.spec.secrets[]` [#appspecsecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.sensors[]` [#appspecsensors]

| Field | Type and limits | Description |
| --- | --- | --- |
| `do` | array of [`App.spec.sensors[].do[]`](#appspecsensorsdo) | The actions the Sensor runs: at least one, with unique names. An event runs every action whose on names its dependency; a failed action is tried eventing.deliveryAttempts times in all, then stored as a dead letter, which funcdctl eventing dlq list shows; while eventing.maxQueuedPerSensor deliveries wait, a new one becomes a dead letter with no attempt. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `on` | array of [`App.spec.sensors[].on[]`](#appspecsensorson) | The events the Sensor subscribes to, as named dependencies: at least one, with unique names. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.sensors[].do[]` [#appspecsensorsdo]

| Field | Type and limits | Description |
| --- | --- | --- |
| `function` | string, a DNS-1123 label | Each event calls this Function, in the Sensor's namespace, with the CloudEvent, whose data is the action's input; funcd starts a worker first when none runs. A Function whose protocol is http is never called: the Sensor is not Ready, with reason TargetServesHTTP, and each event for this action ends as a dead letter. Exactly one of workflow and function. |
| `input` | any JSON value | What the action passes: the run's input, or the data of the CloudEvent the Function receives. Absent or null, it is the event's data; otherwise it is a JSON object whose top-level values are literals, or strings that are a single $&#123;&#123; &#125;&#125; expression reading event.id, event.source, event.type, event.time or event.data. An input that is not an object, or holds an invalid expression, makes the Sensor not Ready, with reason InvalidInput, and then none of its actions runs. |
| `name` | string, required, a DNS-1123 label | The action's name, unique among the Sensor's actions. Dead letters record it, and a WorkflowRun it starts is named after the Sensor and this name, with a random suffix. |
| `on` | string, required, a DNS-1123 label | The name of the dependency whose events run this action, one of the Sensor's on entries. |
| `workflow` | string, a DNS-1123 label | Each event starts a WorkflowRun of this Workflow, in the Sensor's namespace and resource group, with the action's input. The action succeeds once the run is created; a run whose input breaks the Workflow's contract or passes workflow.payloadLimit fails at its start. Exactly one of workflow and function. |

### `App.spec.sensors[].on[]` [#appspecsensorson]

| Field | Type and limits | Description |
| --- | --- | --- |
| `event` | string, required, a DNS-1123 label | The name of one of that EventSource's events, which is the type of each CloudEvent the dependency receives. |
| `name` | string, required, a DNS-1123 label | The dependency's name, unique among the Sensor's dependencies; an action's on names it. |
| `source` | string, required, a DNS-1123 label | The name of an EventSource in the Sensor's namespace. |

### `App.spec.sites[]` [#appspecsites]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.sites[].bindings`](#appspecsitesbindings) | Where the Site stores and serves its bundles: one Bucket prefix, in blob. |
| `buckets` | array of [`App.spec.sites[].buckets[]`](#appspecsitesbuckets) | Exactly the one Bucket that bindings.blob names, never with deletion: delete; a Site in an App sets none and refers to that Bucket by ref. By name, the Site creates the Bucket with that prefix, without an owner, and the prefixes listed here, which may not repeat it; a Bucket of that name that the Site did not create leaves the Site not Ready. By ref, the Site is Ready only once the Bucket holds that prefix without an owner, and it never changes the Bucket. |
| `image` | string | The OCI artifact of the Site's static files, which funcdctl push --site makes, named by a tag or a digest. funcd resolves a tag to a digest when the spec changes, so a tag that moves after a deploy changes nothing until the spec changes again. Each deployed bundle stays in the Bucket, so pointing image back at an earlier one serves it again without an upload. A bundle with a \_runtime entry at its root does not deploy: funcd keeps that name for the files it generates. |
| `index` | string | The bundle's file served for /, by its file name for any other path that ends in /, and with spa for a path that matches no file. It is a path in the bundle, with no leading /; a bundle without it does not deploy, and the previous one keeps serving. Empty means site.defaultIndex, index.html by default. |
| `ingress` | object, [`App.spec.sites[].ingress`](#appspecsitesingress) | Where the edge serves the Site: its own address and its rules, through a Route of the Site's name that the Site writes. A Route of that name that the Site does not own leaves the Site not Ready. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `runtimeConfig` | object, [`App.spec.sites[].runtimeConfig`](#appspecsitesruntimeconfig) | Values each deployment sets without a rebuild, served as config.json beside the bundle. Every client that can load the Site can read it: never put a secret in it. |
| `spa` | boolean | Serve the index, with status 200, for a path under the bundle's path that matches no file, so that a client-side router handles it. ingress.rules never fall back to it: a missing file there is 404. |

### `App.spec.sites[].bindings` [#appspecsitesbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `blob` | array of [`App.spec.sites[].bindings.blob[]`](#appspecsitesbindingsblob), required | Exactly one entry: the Bucket and the prefix that hold the Site's bundles. |

### `App.spec.sites[].bindings.blob[]` [#appspecsitesbindingsblob]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, required, a DNS-1123 label | The Bucket that holds the Site's bundles, in the Site's namespace. |
| `prefix` | string, required, a DNS-1123 label | The prefix of that Bucket under which the Site stores each bundle, at &lt;prefix&gt;/sha256-&lt;hex&gt;/, and the config.json that runtimeConfig generates. It cannot change once the Site exists: a new prefix needs a new Site. |

### `App.spec.sites[].buckets[]` [#appspecsitesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.sites[].ingress` [#appspecsitesingress]

| Field | Type and limits | Description |
| --- | --- | --- |
| `auth` | object, [`App.spec.addons[].ingress.auth`](#appspecaddonsingressauth) | How 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. |
| `baseHref` | boolean | Serve a copy of the bundle's index whose &lt;base href&gt; is the Site's mount, so a bundle built with relative URLs runs at any path, deep links included. |
| `enabled` | boolean | Turns 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. |
| `host` | string | The exact host of the resource's own address. Empty is the namespace's host, &lt;namespace&gt;.&lt;server.baseDomain&gt;, or, in the default namespace, any host that no other namespace reserves. |
| `path` | string | The 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/&lt;name&gt;, /site/&lt;name&gt; or /lake/&lt;name&gt; by kind. |
| `rules` | array of [`App.spec.sites[].ingress.rules[]`](#appspecsitesingressrules) | More Bucket prefixes the Site serves, each at its own path, with the bundle's host, auth and enabled. A rule may sit below the bundle's path, since the longest matching path wins, and a missing file there is 404, never the bundle's index. |

### `App.spec.sites[].ingress.rules[]` [#appspecsitesingressrules]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bucket` | string, a DNS-1123 label | A Bucket of the Site's namespace, which buckets need not declare; empty means the Bucket of bindings.blob. While it does not exist, the Site's Route serves nothing, the bundle included, and the Site is not Ready. |
| `path` | string, required | The path where the prefix is served, matching it and every path below it. It begins with / and may not be /, another rule's path or the bundle's path, which is ingress.path or its default. With runtimeConfig, it may not be the path of config.json either. |
| `prefix` | string, required, a DNS-1123 label | The prefix of that Bucket served at path: &lt;path&gt;/&lt;key&gt; reads the object &lt;prefix&gt;/&lt;key&gt; as the Bucket holds it, since nothing is copied. |

### `App.spec.sites[].runtimeConfig` [#appspecsitesruntimeconfig]

| Field | Type and limits | Description |
| --- | --- | --- |
| `configMap` | string, a DNS-1123 label | A ConfigMap of the Site's namespace whose data adds keys to config.json; a key of values wins over the same key here. In an App, it may name one of the App's configMaps entries. While it does not exist, the Site is not Ready, though its bundle still deploys and its last config.json, if any, keeps serving; a change to it rewrites only the file. |
| `values` | map of string to string | Keys and the string values that config.json gives them; a key here wins over the same key from configMap. Each key is an environment variable name: ASCII letters, digits and \_, not starting with a digit. The file holds at most 32768 bytes (32 KiB): values that alone pass it are refused, and a file that configMap takes past it leaves the Site not Ready, serving its last config.json, if any. |

### `App.spec.sql[]` [#appspecsql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |
| `quota` | object, [`App.spec.buckets[].prefixes[].quota`](#appspecbucketsprefixesquota) | A 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |

### `App.spec.workflows[]` [#appspecworkflows]

| Field | Type and limits | Description |
| --- | --- | --- |
| `buckets` | array of [`App.spec.workflows[].buckets[]`](#appspecworkflowsbuckets) | 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. |
| `configMaps` | array of [`App.spec.workflows[].configMaps[]`](#appspecworkflowsconfigmaps) | 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. |
| `contract` | object, [`App.spec.workflows[].contract`](#appspecworkflowscontract) | A 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. |
| `kv` | array of [`App.spec.workflows[].kv[]`](#appspecworkflowskv) | 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. |
| `lakes` | array of [`App.spec.workflows[].lakes[]`](#appspecworkflowslakes) | 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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `onFailure` | string, a DNS-1123 label | The 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. |
| `pooling` | object, [`App.spec.workflows[].pooling`](#appspecworkflowspooling) | How the image steps' Functions share workers and stay warm. A step's function.pooling replaces it for that step. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `secrets` | array of [`App.spec.workflows[].secrets[]`](#appspecworkflowssecrets) | 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. |
| `sql` | array of [`App.spec.workflows[].sql[]`](#appspecworkflowssql) | 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. |
| `steps` | array of [`App.spec.workflows[].steps[]`](#appspecworkflowssteps) | The steps each run executes, at least one. They run in list order unless dependsOn says otherwise, and the first step takes the run input. |
| `timeout` | string, 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. |

### `App.spec.workflows[].buckets[]` [#appspecworkflowsbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.workflows[].configMaps[]` [#appspecworkflowsconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.workflows[].contract` [#appspecworkflowscontract]

| Field | Type and limits | Description |
| --- | --- | --- |
| `dialect` | string | The URI of the JSON Schema dialect that input and output follow. funcd checks nothing against it. |
| `input` | any JSON value | The JSON Schema of the input. A declared one must be an object, and each property it does not require must declare a default. |
| `output` | any JSON value | The JSON Schema of the output. A declared one must be an object, and each property it does not require must declare a default. |

### `App.spec.workflows[].kv[]` [#appspecworkflowskv]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `quota` | object, [`App.spec.functions[].kv[].quota`](#appspecfunctionskvquota) | Caps on the store's total size, on each value and on each key. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `tables` | array of [`App.spec.functions[].kv[].tables[]`](#appspecfunctionskvtables) | 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. |

### `App.spec.workflows[].lakes[]` [#appspecworkflowslakes]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.functions[].lakes[].bindings`](#appspecfunctionslakesbindings) | What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment. |
| `buckets` | array of [`App.spec.workflows[].lakes[].buckets[]`](#appspecworkflowslakesbuckets) | 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. |
| `configMaps` | array of [`App.spec.workflows[].lakes[].configMaps[]`](#appspecworkflowslakesconfigmaps) | 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. |
| `ingress` | object, [`App.spec.addons[].ingress`](#appspecaddonsingress) | Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/&lt;name&gt;, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself. |
| `location` | object, [`App.spec.functions[].lakes[].location`](#appspecfunctionslakeslocation) | The 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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |
| `secrets` | array of [`App.spec.workflows[].lakes[].secrets[]`](#appspecworkflowslakessecrets) | 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. |

### `App.spec.workflows[].lakes[].buckets[]` [#appspecworkflowslakesbuckets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `prefixes` | array of [`App.spec.buckets[].prefixes[]`](#appspecbucketsprefixes) | 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. |
| `quota` | object, [`App.spec.buckets[].quota`](#appspecbucketsquota) | Caps 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.workflows[].lakes[].configMaps[]` [#appspecworkflowslakesconfigmaps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `data` | map of string to string | Keys 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. |
| `name` | string, a DNS-1123 label | The ConfigMap's name, at most 52 characters. It is stored as &lt;name&gt;-&lt;hash of data&gt;, and the config of each part that names it is set to that stored name. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |

### `App.spec.workflows[].lakes[].secrets[]` [#appspecworkflowslakessecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.workflows[].pooling` [#appspecworkflowspooling]

| Field | Type and limits | Description |
| --- | --- | --- |
| `minReplicas` | integer, 0 to 15 | The 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. |
| `mode` | string, one of `shared`, `isolated` | shared, 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. |
| `worker` | string, a DNS-1123 label | The pool worker's name when mode is shared; empty means the Workflow's name. isolated ignores it. |

### `App.spec.workflows[].secrets[]` [#appspecworkflowssecrets]

| Field | Type and limits | Description |
| --- | --- | --- |
| `description` | string | What the Secret is for, for the installer who provides it. |
| `keys` | array 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. |
| `name` | string, required, a DNS-1123 label | The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it. |

### `App.spec.workflows[].sql[]` [#appspecworkflowssql]

| Field | Type and limits | Description |
| --- | --- | --- |
| `deletion` | string, one of `retain`, `delete` | retain (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. |
| `name` | string, a DNS-1123 label | The object's name. It takes the namespace and resource group of the resource that declares it. |
| `owner` | object, [`App.spec.buckets[].prefixes[].owner`](#appspecbucketsprefixesowner) | The 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. |
| `quota` | object, [`App.spec.buckets[].prefixes[].quota`](#appspecbucketsprefixesquota) | A 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. |
| `ref` | string, a DNS-1123 label | The name of an existing object of this kind in the namespace of the resource that declares it. A ref entry sets no other field. |
| `resources` | object, [`App.spec.addons[].resources`](#appspecaddonsresources) | The 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. |

### `App.spec.workflows[].steps[]` [#appspecworkflowssteps]

| Field | Type and limits | Description |
| --- | --- | --- |
| `builtin` | object, [`App.spec.workflows[].steps[].builtin`](#appspecworkflowsstepsbuiltin) | A step that funcd runs itself, with no Function: a wait or a pass. Exactly one of function, builtin and workflow. |
| `dependsOn` | array of string values, each a DNS-1123 label | The 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. |
| `function` | object, [`App.spec.workflows[].steps[].function`](#appspecworkflowsstepsfunction) | A 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. |
| `join` | string, one of `all`, `any` | How 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. |
| `name` | string, required, a DNS-1123 label | The step's name, unique among the steps. dependsOn, onFailure, store owners and step.&lt;name&gt;.output in expressions refer to the step by it, and an image step's Function is named &lt;workflow&gt;-&lt;step&gt;. |
| `params` | any JSON value | A 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. |
| `when` | object, [`App.spec.workflows[].steps[].when`](#appspecworkflowsstepswhen) | A 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. |
| `workflow` | object, [`App.spec.workflows[].steps[].workflow`](#appspecworkflowsstepsworkflow) | A 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. |

### `App.spec.workflows[].steps[].builtin` [#appspecworkflowsstepsbuiltin]

| Field | Type and limits | Description |
| --- | --- | --- |
| `pass` | string | A $&#123;&#123; &#125;&#125; JavaScript expression whose value is the step's output, over input, the run input, and step.&lt;name&gt;.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. |
| `wait` | string | How long the step waits before it succeeds with its input as its output: a duration such as 30s, checked at apply, or a $&#123;&#123; &#125;&#125; 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. |

### `App.spec.workflows[].steps[].function` [#appspecworkflowsstepsfunction]

| Field | Type and limits | Description |
| --- | --- | --- |
| `bindings` | object, [`App.spec.workflows[].steps[].function.bindings`](#appspecworkflowsstepsfunctionbindings) | What 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. |
| `image` | string | The artifact of the step's own Function, &lt;workflow&gt;-&lt;step&gt;, 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. |
| `pooling` | object, [`App.spec.workflows[].pooling`](#appspecworkflowspooling) | Replaces 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. |
| `ref` | string, a DNS-1123 label | The 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. |
| `retry` | object, [`App.spec.workflows[].steps[].function.retry`](#appspecworkflowsstepsfunctionretry) | How 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. |
| `timeout` | string, 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. |

### `App.spec.workflows[].steps[].function.bindings` [#appspecworkflowsstepsfunctionbindings]

| Field | Type and limits | Description |
| --- | --- | --- |
| `blob` | array of [`App.spec.functions[].bindings.blob[]`](#appspecfunctionsbindingsblob) | 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. |
| `config` | array of string values, each a DNS-1123 label | ConfigMaps 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. |
| `kv` | array of [`App.spec.functions[].bindings.kv[]`](#appspecfunctionsbindingskv) | 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. |
| `lake` | array of [`App.spec.functions[].bindings.lake[]`](#appspecfunctionsbindingslake) | 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. |
| `secret` | array of string values, each a DNS-1123 label | Secrets 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. |
| `sql` | array of [`App.spec.functions[].bindings.sql[]`](#appspecfunctionsbindingssql) | 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. |

### `App.spec.workflows[].steps[].function.retry` [#appspecworkflowsstepsfunctionretry]

| Field | Type and limits | Description |
| --- | --- | --- |
| `backoff` | string, 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. |
| `maxAttempts` | integer, 1 to 100 | How 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. |

### `App.spec.workflows[].steps[].when` [#appspecworkflowsstepswhen]

| Field | Type and limits | Description |
| --- | --- | --- |
| `condition` | string, required | A $&#123;&#123; &#125;&#125; JavaScript expression that yields true or false, over input, the run input, and step.&lt;name&gt;.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. |

### `App.spec.workflows[].steps[].workflow` [#appspecworkflowsstepsworkflow]

| Field | Type and limits | Description |
| --- | --- | --- |
| `ref` | string, a DNS-1123 label | The 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. |

### `App.status` [#appstatus]

| Field | Type and limits | Description |
| --- | --- | --- |
| `children` | array of [`App.status.children[]`](#appstatuschildren) | One line per entry of configMaps, kv, buckets, sql, addons, functions, jobs, workflows, eventSources, sensors, routes, sites, lakes and backupSchedules, ref entries included, in that order, which is the order funcd writes them; an addons line names the add-on's kind. Then one Pruning line per dropped object not deleted yet. |
| `conditions` | array of [Condition](/docs/develop/common-definitions.md#condition) | The conditions that explain the phase. |
| `currentRevision` | string, a DNS-1123 label | The AppRevision whose rollout last completed, empty until one has. After a failed rollout the parts keep the newer spec, so it names the last complete rollout, not what runs. |
| `lagEndedAt` | string, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When a part last stopped being Lagging while the latest revision was rolling out. The rollout's deadline counts from it too, so a part written once its wait ends has a full app.upgradeTimeout to turn Ready. |
| `lastSelfHeal` | object, [`App.status.lastSelfHeal`](#appstatuslastselfheal) | The last part that funcd wrote back after another writer changed or deleted it, and when. |
| `latestRevision` | string, a DNS-1123 label | The newest AppRevision, created for the latest spec. It differs from currentRevision while a rollout waits or runs, and after one fails. |
| `observedGeneration` | integer | The generation of the spec that funcd last acted on. |
| `phase` | string, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Where the object is in its lifecycle. |
| `plan` | object, [`App.status.plan`](#appstatusplan) | What the write would make the rollout do, set only in the answer to a dry-run write (dryRun=true) and never stored. It leaves timing out: a hold, a pause or an unmet requirement does not show. |
| `requiredBy` | array of string values, each a DNS-1123 label | The Apps of this namespace whose spec.requires names this App, sorted by name. |
| `requires` | array of [`App.status.requires[]`](#appstatusrequires) | The state of each spec.requires entry, in its order. |
| `version` | string | The spec.version of the current revision. |

### `App.status.children[]` [#appstatuschildren]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required | The object's kind. |
| `name` | string, required, a DNS-1123 label | The object's name: a ref entry's target, and for a defined ConfigMap its stored name. |
| `reason` | string | Why the part is not Ready, such as RefNotFound, Progressing, ChildNotOwned, ChildInvalid, StepNotReady or the part's own reason, such as AwaitingApproval for a stack. For a part that waits for a Secret's key, SecretKeyMissing: Secret/&lt;name&gt; &lt;key&gt;. For a Pruning object, why it is kept, such as NotCurrent until the new revision is current, RunHeld while a run holds the Function, or InUse: &lt;Kind&gt;/&lt;name&gt;. |
| `state` | string, required, one of `Ready`, `NotStarted`, `Pending`, `Lagging`, `Pruning` | Ready when the part exists and is ready. NotStarted for a Function that has not run since it changed, such as one scaled to zero: it does not hold up the rollout, and it makes the App's Ready condition Unknown rather than True. Pending while the part is missing or not ready. Lagging for a part that waits for what funcd does not run: an add-on part whose kind runs no engine, such as a stack, while it is not Ready at its generation, or a part that names a Secret one of the App's Jobs owns while that Secret lacks a declared key, which funcd does not write until then. Pruning for a dropped object not deleted yet. The App's Ready condition, its rollout and its deadline leave out a Lagging part and a Pruning object, while its post-hooks and prune wait for every Lagging part. |

### `App.status.lastSelfHeal` [#appstatuslastselfheal]

| Field | Type and limits | Description |
| --- | --- | --- |
| `at` | string, required, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When funcd wrote it back. |
| `kind` | string, required | The kind of the part written back. |
| `name` | string, required, a DNS-1123 label | The name of the part written back. |

### `App.status.plan` [#appstatusplan]

| Field | Type and limits | Description |
| --- | --- | --- |
| `hooks` | array of string values | The hook Functions the new revision would call, in call order: preApply, then postApply, a Function in both lists twice. Empty when the write would create no revision. |
| `parts` | array of [`App.status.plan.parts[]`](#appstatusplanparts) | The parts the write would create or update, in the order of status.children, then the objects it would prune. Where the rollout would stop, it holds only the line of that stop. |
| `revision` | string, a DNS-1123 label | The AppRevision the write would create. Empty when the latest revision has this spec already, or when an object of another owner holds that name, which parts then shows. |

### `App.status.plan.parts[]` [#appstatusplanparts]

| Field | Type and limits | Description |
| --- | --- | --- |
| `action` | string, one of `create`, `update`, `prune` | What the write would do to the object. Empty on the line of a declared Secret where the rollout would stop. |
| `kind` | string, required | The object's kind. |
| `name` | string, required, a DNS-1123 label | The object's name; for a defined ConfigMap, its stored name. |
| `reason` | string | Set only on the line where the rollout would stop: ChildNotOwned when an object of another owner holds the name, SecretNotFound or SecretKeyMissing for a declared Secret. |

### `App.status.requires[]` [#appstatusrequires]

| Field | Type and limits | Description |
| --- | --- | --- |
| `app` | string, required, a DNS-1123 label | The required App, as its spec.requires entry names it. |
| `met` | boolean, required | Whether the required App exists, has a spec.version the range accepts, and is Ready with that spec rolled out. |
| `version` | string | The required App's spec.version, empty when it sets none or does not exist. |

## AppRevision [#apprevision]

| apiVersion | kind |
| --- | --- |
| `funcd.io/v1alpha1` | `AppRevision` |

### `AppRevision.spec` [#apprevisionspec]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addonRevisions` | array of [`AppRevision.spec.addonRevisions[]`](#apprevisionspecaddonrevisions) | The AddonRevision of each add-on kind of the App's addons parts, set when the revision was created: the Addon's current revision, or for the spec of a kept revision that was current once, that revision's records. A part runs its kind's record once this revision is applied. |
| `app` | object, [`AppRevision.spec.app`](#apprevisionspecapp), required | The App this revision belongs to. |
| `hookInput` | object, [`AppRevision.spec.hookInput`](#apprevisionspechookinput) | The data that each hook call of this revision receives, fixed when the revision was created. Set only when its spec has a hook. |
| `number` | integer, required, 1 to 9999999999 | The revision's number: 1 for the App's first revision, then one more than the latest. The revision is named &lt;app&gt;-&lt;number&gt;, and funcdctl app rollback takes this number. |
| `spec` | object, [`App.spec`](#appspec), required | The App's spec when this revision was created, without spec.paused. It never changes. |

### `AppRevision.spec.addonRevisions[]` [#apprevisionspecaddonrevisions]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required | The add-on's kind. |
| `revision` | string, required, a DNS-1123 label | The AddonRevision the App's parts of that kind run. |

### `AppRevision.spec.app` [#apprevisionspecapp]

| Field | Type and limits | Description |
| --- | --- | --- |
| `kind` | string, required | The kind of the object it names. |
| `name` | string, required, a DNS-1123 label | The name of the object it names. |
| `namespace` | string, a DNS-1123 label | The namespace of the object it names. |

### `AppRevision.spec.hookInput` [#apprevisionspechookinput]

| Field | Type and limits | Description |
| --- | --- | --- |
| `addonRevisions` | array of [`AppRevision.spec.hookInput.addonRevisions[]`](#apprevisionspechookinputaddonrevisions) | Each addons part whose AddonRevision this revision changes: the revision it runs when this one was created, and the one it runs once this one is applied. A pre-hook runs while the part runs from, a post-hook once it runs to. |
| `app` | string, required, a DNS-1123 label | The App's name. |
| `event` | string, required, one of `install`, `upgrade`, `rollback` | install when the App had no current revision, rollback when the spec equals that of a kept revision that was current once, upgrade otherwise. |
| `from` | string, a DNS-1123 label | The App's current revision when this one was created, empty on an install. |
| `fromVersion` | string | The spec.version of the from revision, empty on an install or when it sets none. |
| `to` | string, required, a DNS-1123 label | This revision's name. |
| `toVersion` | string | This revision's spec.version, empty when it sets none. |

### `AppRevision.spec.hookInput.addonRevisions[]` [#apprevisionspechookinputaddonrevisions]

| Field | Type and limits | Description |
| --- | --- | --- |
| `from` | string, a DNS-1123 label | The AddonRevision the part ran when the App revision was created; empty for a part that ran none yet. |
| `kind` | string, required | The part's add-on kind. |
| `object` | string, required, a DNS-1123 label | The part's name. |
| `to` | string, required, a DNS-1123 label | The AddonRevision the part runs once the App revision is applied. |

### `AppRevision.status` [#apprevisionstatus]

| Field | Type and limits | Description |
| --- | --- | --- |
| `conditions` | array of [Condition](/docs/develop/common-definitions.md#condition) | The conditions that explain the phase. |
| `hooks` | array of [`AppRevision.status.hooks[]`](#apprevisionstatushooks) | The hook calls of this revision in call order, a retried call included. A call that ends during a stop of funcd, a hold or a pause of the App is not recorded and is made again. |
| `observedGeneration` | integer | The generation of the spec that funcd last acted on. |
| `phase` | string, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Where the object is in its lifecycle. |
| `startedAt` | string, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When the rollout started: when the revision was created, or, when it waited for required Apps, once they were all met; unset while it waits. The rollout fails if it is not complete app.upgradeTimeout after the latest of this time, a resume of the App, the release of a hold, the end of the last pre-hook call and the end of a part's wait, the App's status.lagEndedAt, unless a pre-hook call is running. |

### `AppRevision.status.hooks[]` [#apprevisionstatushooks]

| Field | Type and limits | Description |
| --- | --- | --- |
| `endTime` | string, required, an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z) | When the call ended. |
| `function` | string, required, a DNS-1123 label | The hook Function that was called. |
| `invocation` | string, required, a DNS-1123 label | The Invocation that records the call, with its start, end and error. It belongs to this revision and is deleted with it. |
| `phase` | string, required, one of `Pending`, `Deploying`, `Ready`, `Idle`, `Degraded`, `Failed`, `Terminating` | Ready when the call succeeded and Failed when it did not; no other phase appears here. |
| `point` | string, required, one of `preApply`, `postApply` | The hook list the call was made for. |

## HTTP API [#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.

| Method | Path | Operation |
| --- | --- | --- |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps` | [List the Apps of a namespace](/docs/api/workloads/app/list.md) |
| `POST` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps` | [Create an App](/docs/api/workloads/app/create.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps/{name}` | [Read an App](/docs/api/workloads/app/get.md) |
| `PUT` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps/{name}` | [Replace an App](/docs/api/workloads/app/replace.md) |
| `DELETE` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps/{name}` | [Delete an App](/docs/api/workloads/app/delete.md) |
| `POST` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apps/{name}/retry` | [Retry the failed hook of an App](/docs/api/workloads/app/retry.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apprevisions` | [List the AppRevisions of a namespace](/docs/api/workloads/apprevision/list.md) |
| `GET` | `/apis/funcd.io/v1alpha1/namespaces/{namespace}/apprevisions/{name}` | [Read an AppRevision](/docs/api/workloads/apprevision/get.md) |
