# Create an App

URL: /docs/api/workloads/app/create

`POST /apis/funcd.io/v1alpha1/namespaces/{namespace}/apps`

## Authentication

One of:

- `bearer`: A credential of funcd's config, sent as Authorization: Bearer followed by its token.
- `apiKey`: A credential of funcd's config, sent in the X-Api-Key header.

## Parameters

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `namespace` | path | string, required | The object's namespace. |
| `dryRun` | query | boolean | Admit the write and store nothing. |

## Body

`App` as `application/json`, required.

```json
{
  "additionalProperties": false,
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "additionalProperties": false,
      "properties": {
        "creationTimestamp": {
          "description": "When funcd created the object.",
          "format": "date-time",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
          "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
          "type": "string"
        },
        "deletionTimestamp": {
          "description": "When funcd held the object at its deletion: an object of an Engineless add-on kind with deletion: delete stays, deleting, until its Function has destroyed what it holds. funcd sets it on no other object, and a write keeps it.",
          "format": "date-time",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
          "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
          "type": "string"
        },
        "finalizers": {
          "description": "funcd does not read it.",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "generateName": {
          "description": "A prefix from which funcd makes the name, adding a random suffix, when a create leaves name empty.",
          "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
          "type": "string"
        },
        "generation": {
          "description": "Set by funcd: 1 when the object is created, then one more each time its spec changes.",
          "format": "int64",
          "type": "integer"
        },
        "name": {
          "description": "The object's name, unique among the objects of its kind in its namespace. A create may leave it empty and set generateName instead.",
          "maxLength": 63,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
          "type": "string"
        },
        "namespace": {
          "description": "The namespace the object belongs to. A cluster-scoped kind has none.",
          "maxLength": 63,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
          "type": "string"
        },
        "ownerReferences": {
          "description": "The objects that own this one. funcd deletes an owned object when its owner goes.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "blockOwnerDeletion": {
                "description": "funcd does not read it.",
                "type": "boolean"
              },
              "controller": {
                "description": "Whether this owner is the one that manages the object.",
                "type": "boolean"
              },
              "kind": {
                "description": "The kind of the object it names.",
                "type": "string"
              },
              "name": {
                "description": "The name of the object it names.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "namespace": {
                "description": "The namespace of the object it names.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "uid": {
                "description": "The owner's unique ID.",
                "type": "string"
              }
            },
            "required": [
              "uid",
              "kind",
              "name"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "resourceGroup": {
          "description": "The resource group the object belongs to, within its namespace.",
          "maxLength": 63,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
          "type": "string"
        },
        "resourceVersion": {
          "description": "An opaque version of the stored object, which funcd sets. An update that sends it gets a conflict when the object changed since; compare it for equality only.",
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Labels on the object, as keys and values.",
          "type": "object"
        },
        "uid": {
          "description": "The object's unique ID, which funcd sets when it creates the object.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "addons": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "bindings": {
                "additionalProperties": false,
                "properties": {
                  "job": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The name that the code passes to ctx.job.start and ctx.job.get. Unique in the list.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "job": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "job"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "secret": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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": {
                "description": "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.",
                "enum": [
                  "retain",
                  "delete"
                ],
                "type": "string"
              },
              "functions": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "kind": {
                      "description": "A settings kind of the object's Addon, named once.",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "ref"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "ingress": {
                "additionalProperties": false,
                "properties": {
                  "auth": {
                    "additionalProperties": false,
                    "properties": {
                      "mode": {
                        "description": "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.",
                        "enum": [
                          "",
                          "authenticated",
                          "open",
                          "oidc"
                        ],
                        "type": "string"
                      },
                      "provider": {
                        "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                        "maxLength": 63,
                        "minLength": 1,
                        "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                        "type": "string"
                      },
                      "unauthenticated": {
                        "description": "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.",
                        "enum": [
                          "",
                          "redirect",
                          "401",
                          "allow"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "description": "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": {
                    "description": "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.",
                    "type": "boolean"
                  },
                  "host": {
                    "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                    "type": "string"
                  },
                  "path": {
                    "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "The add-on's kind: one that an Addon registers, as the Addon writes it. A ref entry leaves it unset.",
                "type": "string"
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "resources": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "description": "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.",
                    "type": "string"
                  },
                  "memory": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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."
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "backupSchedules": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "encryption": {
                "additionalProperties": false,
                "properties": {
                  "recipients": {
                    "description": "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.",
                    "items": {
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "recipients"
                ],
                "type": "object",
                "description": "The age recipients that seal the member files of each Backup. It is required: a schedule with fewer than 2 recipients is refused."
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "paused": {
                "description": "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.",
                "type": "boolean"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "schedule": {
                "description": "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.",
                "type": "string"
              },
              "scope": {
                "additionalProperties": false,
                "properties": {
                  "addons": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "app": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "buckets": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "databases": {
                    "description": "SQLDatabases of the namespace to copy, by name, each once. A database whose engine is not Ready fails the Backup with reason EngineNotReady.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "kvStores": {
                    "description": "KVStores of the namespace to copy, by name, each once.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "lakes": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "resourceGroup": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "volumes": {
                    "description": "Local volumes of the namespace's Functions to copy, each as <function>/<name>, 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.",
                    "items": {
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "description": "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": {
                "additionalProperties": false,
                "properties": {
                  "credentialsSecret": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "url": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "credentialsSecret"
                ],
                "type": "object",
                "description": "Where each Backup writes its copy: an S3 bucket and the Secret of its write key."
              },
              "timeZone": {
                "description": "The IANA time zone of schedule, such as Europe/Paris; UTC when empty.",
                "type": "string"
              },
              "ttl": {
                "description": "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.",
                "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "buckets": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "deletion": {
                "description": "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.",
                "enum": [
                  "retain",
                  "delete"
                ],
                "type": "string"
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "prefixes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "owner": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "description": "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.",
                          "enum": [
                            "Function",
                            "Lake",
                            "Job"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "description": "The workload's name, in the object's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "name"
                      ],
                      "type": "object",
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "quota": {
                "additionalProperties": false,
                "properties": {
                  "maxBytes": {
                    "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                    "format": "int64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "maxObjectBytes": {
                    "description": "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.",
                    "format": "int64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "maxSize": {
                    "description": "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.",
                    "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                    "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "configMaps": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "additionalProperties": {
                  "type": "string"
                },
                "description": "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.",
                "type": "object"
              },
              "name": {
                "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "eventSources": {
          "description": "The EventSources that the App declares or refers to; no two entries name the same one.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "blob": {
                "additionalProperties": false,
                "properties": {
                  "bucket": {
                    "description": "The Bucket, in this namespace, whose objects fire the events. Until it exists, the source is not Ready, with reason BucketNotFound, and watches nothing.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "events": {
                    "description": "The source's events: at least one, with unique names, each watching the objects under its prefix.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "name": {
                          "description": "The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "on": {
                          "description": "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.",
                          "items": {
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "prefix": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bucket",
                  "events"
                ],
                "type": "object",
                "description": "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": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "sql": {
                "additionalProperties": false,
                "properties": {
                  "database": {
                    "description": "The SQLDatabase, in this namespace, whose row changes fire the events. Until it exists, the source is not Ready, with reason DatabaseNotFound.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "events": {
                    "description": "The source's events: at least one, with unique names, each watching one table.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "name": {
                          "description": "The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "on": {
                          "description": "The row changes that fire the event: Insert, Update or Delete. Empty means all three.",
                          "items": {
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "table": {
                          "description": "The table whose row changes fire the event, matched by its exact name, case included.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "table"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "database",
                  "events"
                ],
                "type": "object",
                "description": "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": {
                "additionalProperties": false,
                "properties": {
                  "events": {
                    "description": "The timer's events: at least one, with unique names, each firing on its own schedule.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "cron": {
                          "description": "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.",
                          "type": "string"
                        },
                        "interval": {
                          "description": "The tick period: 100ms to 24h. Exactly one of interval and cron.",
                          "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                          "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                          "type": "string"
                        },
                        "name": {
                          "description": "The event's name, unique among the source's events: the type of each CloudEvent it fires, and the event a Sensor dependency names.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "timeZone": {
                          "description": "The IANA time zone of cron, such as Europe/Paris; UTC when empty. Only with cron.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "events"
                ],
                "type": "object",
                "description": "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."
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "functions": {
          "description": "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 <workflow>-<step>, a name no entry may declare.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "bindings": {
                "additionalProperties": false,
                "properties": {
                  "addon": {
                    "description": "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_<ALIAS>_URL with the header X-Funcd-Addon-Token set to FUNCD_ADDON_<ALIAS>_TOKEN. Each call goes through funcd, which asks Cedar for addon::call and serves only the paths that the object's edge entry serves.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The name the handler calls the object by: ctx.addon.fetch takes it, and the worker gets FUNCD_ADDON_<ALIAS>_URL and FUNCD_ADDON_<ALIAS>_TOKEN for an HTTP SDK. Unique in the list.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "object": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "object"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "blob": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "bucket": {
                          "description": "The Bucket, in the same namespace, that holds the prefix.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "The prefix, by its name in the Bucket's prefixes.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "bucket",
                        "prefix"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "config": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "job": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The name that the code passes to ctx.job.start and ctx.job.get. Unique in the list.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "job": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "job"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "kv": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list, which the code passes to ctx.kv.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "store": {
                          "description": "The KVStore, in the same namespace, that holds the table.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "table": {
                          "description": "The table, by its name in the store's tables.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "store",
                        "table"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "lake": {
                    "description": "The Lakes the code queries, each under its alias. The Function waits in Pending with LakeNotReady until every bound Lake is Ready.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE_<ALIAS>_URL and FUNCD_LAKE_<ALIAS>_TOKEN, the alias upper-cased.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "lake": {
                          "description": "The Lake to query, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "lake"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "links": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The link's name, unique in the list, which the code passes to ctx.invoke or ctx.fetch.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "target": {
                          "description": "The Function to call, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "timeout": {
                          "description": "Bounds the synchronous call, a cold-start wake included: 0s to 5m; 0s or unset means the 30s link default.",
                          "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                          "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "target"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "secret": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "sql": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list, which the code passes to ctx.sql.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "database": {
                          "description": "The SQLDatabase to query, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "database"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "prefixes": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxObjectBytes": {
                          "description": "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.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "configMaps": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "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.",
                      "type": "object"
                    },
                    "name": {
                      "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "handler": {
                "description": "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.",
                "pattern": "^[A-Za-z_][A-Za-z0-9_.]*$",
                "type": "string"
              },
              "image": {
                "description": "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.",
                "type": "string"
              },
              "imageDigest": {
                "description": "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.",
                "pattern": "^sha256:[a-f0-9]{64}$",
                "type": "string"
              },
              "ingress": {
                "additionalProperties": false,
                "properties": {
                  "auth": {
                    "additionalProperties": false,
                    "properties": {
                      "mode": {
                        "description": "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.",
                        "enum": [
                          "",
                          "authenticated",
                          "open",
                          "oidc"
                        ],
                        "type": "string"
                      },
                      "provider": {
                        "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                        "maxLength": 63,
                        "minLength": 1,
                        "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                        "type": "string"
                      },
                      "unauthenticated": {
                        "description": "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.",
                        "enum": [
                          "",
                          "redirect",
                          "401",
                          "allow"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "description": "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": {
                    "description": "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.",
                    "type": "boolean"
                  },
                  "host": {
                    "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                    "type": "string"
                  },
                  "path": {
                    "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "The Function's own address at the edge. With no host and no path, it answers by name at /function/<name>; 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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxKeyBytes": {
                          "description": "The longest key, in bytes. 0 means 1024 (1 KiB).",
                          "format": "int64",
                          "maximum": 64000,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        },
                        "maxValueBytes": {
                          "description": "The largest value a write may store, in bytes. 0 means 1048576 (1 MiB).",
                          "format": "int64",
                          "maximum": 1048576,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "type": "object",
                      "description": "Caps on the store's total size, on each value and on each key."
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "tables": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The table's name, unique within the store.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "lakes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "bindings": {
                      "additionalProperties": false,
                      "properties": {
                        "blob": {
                          "description": "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.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "alias": {
                                "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "bucket": {
                                "description": "The Bucket, in the same namespace, that holds the prefix.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "prefix": {
                                "description": "The prefix, by its name in the Bucket's prefixes.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "alias",
                              "bucket",
                              "prefix"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "config": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "secret": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "blob"
                      ],
                      "type": "object",
                      "description": "What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment."
                    },
                    "buckets": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "deletion": {
                            "description": "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.",
                            "enum": [
                              "retain",
                              "delete"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "prefixes": {
                            "description": "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.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                                  "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                  "type": "string"
                                },
                                "owner": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "kind": {
                                      "description": "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.",
                                      "enum": [
                                        "Function",
                                        "Lake",
                                        "Job"
                                      ],
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "The workload's name, in the object's namespace.",
                                      "maxLength": 63,
                                      "minLength": 1,
                                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name"
                                  ],
                                  "type": "object",
                                  "description": "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": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "maxBytes": {
                                      "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                      "format": "int64",
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "maxSize": {
                                      "description": "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.",
                                      "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                      "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object",
                                  "description": "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."
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "quota": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxObjectBytes": {
                                "description": "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.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "configMaps": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "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.",
                            "type": "object"
                          },
                          "name": {
                            "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "ref": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "ingress": {
                      "additionalProperties": false,
                      "properties": {
                        "auth": {
                          "additionalProperties": false,
                          "properties": {
                            "mode": {
                              "description": "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.",
                              "enum": [
                                "",
                                "authenticated",
                                "open",
                                "oidc"
                              ],
                              "type": "string"
                            },
                            "provider": {
                              "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                              "type": "string"
                            },
                            "unauthenticated": {
                              "description": "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.",
                              "enum": [
                                "",
                                "redirect",
                                "401",
                                "allow"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "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.",
                          "type": "boolean"
                        },
                        "host": {
                          "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                          "type": "string"
                        },
                        "path": {
                          "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/<name>, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself."
                    },
                    "location": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "description": "A Bucket of the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "A prefix of that Bucket.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "bucket",
                        "prefix"
                      ],
                      "type": "object",
                      "description": "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": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "description": {
                            "description": "What the Secret is for, for the installer who provides it.",
                            "type": "string"
                          },
                          "keys": {
                            "description": "The keys read from the Secret: its data must hold each of them.",
                            "items": {
                              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "name": {
                            "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "keys"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "pooling": {
                "additionalProperties": false,
                "properties": {
                  "worker": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "Whether the Function shares a worker with other Functions; unset, it runs in workers of its own."
              },
              "protocol": {
                "description": "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.",
                "enum": [
                  "",
                  "cloudevent",
                  "http"
                ],
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "replicas": {
                "description": "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.",
                "format": "int64",
                "maximum": 15,
                "minimum": 0,
                "type": "integer"
              },
              "resources": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "description": "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.",
                    "type": "string"
                  },
                  "memory": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "scaling": {
                "additionalProperties": false,
                "properties": {
                  "idleTimeout": {
                    "description": "The idle time before a worker is reclaimed: 0s to 24h; 0s or unset disables reclaim.",
                    "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                    "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                    "type": "string"
                  },
                  "maxReplicas": {
                    "description": "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.",
                    "format": "int64",
                    "maximum": 15,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "minReplicas": {
                    "description": "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.",
                    "format": "int64",
                    "maximum": 15,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "description": "What the Secret is for, for the installer who provides it.",
                      "type": "string"
                    },
                    "keys": {
                      "description": "The keys read from the Secret: its data must hold each of them.",
                      "items": {
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "name": {
                      "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "keys"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sql": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "owner": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "description": "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.",
                          "enum": [
                            "Function",
                            "Lake",
                            "Job"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "description": "The workload's name, in the object's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "name"
                      ],
                      "type": "object",
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "timeout": {
                "description": "Bounds an external invoke until its response starts: 0s to 1h; 0s or unset means invoke.defaultTimeout.",
                "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                "type": "string"
              },
              "volumes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The volume's name, unique in the list; set name or ref, not both. The code reads the directory's path from FUNCD_VOLUME_<NAME>, the name or ref upper-cased.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "size": {
                      "description": "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.",
                      "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                      "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                      "type": "string"
                    },
                    "sizeBytes": {
                      "description": "The same size as a number of bytes. Set size or sizeBytes, not both.",
                      "format": "int64",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "type": {
                      "description": "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.",
                      "enum": [
                        "emptyDir",
                        "local"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "hooks": {
          "additionalProperties": false,
          "properties": {
            "postApply": {
              "description": "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.",
              "items": {
                "additionalProperties": false,
                "properties": {
                  "function": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  }
                },
                "required": [
                  "function"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "preApply": {
              "description": "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.",
              "items": {
                "additionalProperties": false,
                "properties": {
                  "function": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  }
                },
                "required": [
                  "function"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            }
          },
          "type": "object",
          "description": "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": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "approval": {
                "additionalProperties": false,
                "properties": {
                  "bypass": {
                    "description": "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.",
                    "type": "boolean"
                  },
                  "expiry": {
                    "description": "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.",
                    "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                    "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "Whether a run waits for a person's approval of its preview before it runs. Unset, every run previews and waits."
              },
              "bindings": {
                "additionalProperties": false,
                "properties": {
                  "addon": {
                    "description": "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_<ALIAS>_URL with the header X-Funcd-Addon-Token set to FUNCD_ADDON_<ALIAS>_TOKEN. Each call goes through funcd, which asks Cedar for addon::call and serves only the paths that the object's edge entry serves.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The name the handler calls the object by: ctx.addon.fetch takes it, and the worker gets FUNCD_ADDON_<ALIAS>_URL and FUNCD_ADDON_<ALIAS>_TOKEN for an HTTP SDK. Unique in the list.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "object": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "object"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "blob": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "bucket": {
                          "description": "The Bucket, in the same namespace, that holds the prefix.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "The prefix, by its name in the Bucket's prefixes.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "bucket",
                        "prefix"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "config": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "job": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The name that the code passes to ctx.job.start and ctx.job.get. Unique in the list.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "job": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "job"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "kv": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list, which the code passes to ctx.kv.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "store": {
                          "description": "The KVStore, in the same namespace, that holds the table.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "table": {
                          "description": "The table, by its name in the store's tables.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "store",
                        "table"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "lake": {
                    "description": "The Lakes the code queries, each under its alias. The Function waits in Pending with LakeNotReady until every bound Lake is Ready.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE_<ALIAS>_URL and FUNCD_LAKE_<ALIAS>_TOKEN, the alias upper-cased.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "lake": {
                          "description": "The Lake to query, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "lake"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "links": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The link's name, unique in the list, which the code passes to ctx.invoke or ctx.fetch.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "target": {
                          "description": "The Function to call, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "timeout": {
                          "description": "Bounds the synchronous call, a cold-start wake included: 0s to 5m; 0s or unset means the 30s link default.",
                          "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                          "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "target"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "secret": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "sql": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list, which the code passes to ctx.sql.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "database": {
                          "description": "The SQLDatabase to query, in the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "database"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "prefixes": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxObjectBytes": {
                          "description": "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.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "concurrency": {
                "description": "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.",
                "format": "int64",
                "maximum": 15,
                "minimum": 1,
                "type": "integer"
              },
              "configMaps": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "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.",
                      "type": "object"
                    },
                    "name": {
                      "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "handler": {
                "description": "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.",
                "pattern": "^[A-Za-z_][A-Za-z0-9_.]*$",
                "type": "string"
              },
              "image": {
                "description": "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.",
                "type": "string"
              },
              "imageDigest": {
                "description": "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.",
                "pattern": "^sha256:[a-f0-9]{64}$",
                "type": "string"
              },
              "kv": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxKeyBytes": {
                          "description": "The longest key, in bytes. 0 means 1024 (1 KiB).",
                          "format": "int64",
                          "maximum": 64000,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        },
                        "maxValueBytes": {
                          "description": "The largest value a write may store, in bytes. 0 means 1048576 (1 MiB).",
                          "format": "int64",
                          "maximum": 1048576,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "type": "object",
                      "description": "Caps on the store's total size, on each value and on each key."
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "tables": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The table's name, unique within the store.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "lakes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "bindings": {
                      "additionalProperties": false,
                      "properties": {
                        "blob": {
                          "description": "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.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "alias": {
                                "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "bucket": {
                                "description": "The Bucket, in the same namespace, that holds the prefix.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "prefix": {
                                "description": "The prefix, by its name in the Bucket's prefixes.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "alias",
                              "bucket",
                              "prefix"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "config": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "secret": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "blob"
                      ],
                      "type": "object",
                      "description": "What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment."
                    },
                    "buckets": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "deletion": {
                            "description": "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.",
                            "enum": [
                              "retain",
                              "delete"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "prefixes": {
                            "description": "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.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                                  "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                  "type": "string"
                                },
                                "owner": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "kind": {
                                      "description": "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.",
                                      "enum": [
                                        "Function",
                                        "Lake",
                                        "Job"
                                      ],
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "The workload's name, in the object's namespace.",
                                      "maxLength": 63,
                                      "minLength": 1,
                                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name"
                                  ],
                                  "type": "object",
                                  "description": "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": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "maxBytes": {
                                      "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                      "format": "int64",
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "maxSize": {
                                      "description": "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.",
                                      "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                      "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object",
                                  "description": "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."
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "quota": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxObjectBytes": {
                                "description": "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.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "configMaps": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "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.",
                            "type": "object"
                          },
                          "name": {
                            "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "ref": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "ingress": {
                      "additionalProperties": false,
                      "properties": {
                        "auth": {
                          "additionalProperties": false,
                          "properties": {
                            "mode": {
                              "description": "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.",
                              "enum": [
                                "",
                                "authenticated",
                                "open",
                                "oidc"
                              ],
                              "type": "string"
                            },
                            "provider": {
                              "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                              "type": "string"
                            },
                            "unauthenticated": {
                              "description": "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.",
                              "enum": [
                                "",
                                "redirect",
                                "401",
                                "allow"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "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.",
                          "type": "boolean"
                        },
                        "host": {
                          "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                          "type": "string"
                        },
                        "path": {
                          "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/<name>, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself."
                    },
                    "location": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "description": "A Bucket of the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "A prefix of that Bucket.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "bucket",
                        "prefix"
                      ],
                      "type": "object",
                      "description": "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": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "description": {
                            "description": "What the Secret is for, for the installer who provides it.",
                            "type": "string"
                          },
                          "keys": {
                            "description": "The keys read from the Secret: its data must hold each of them.",
                            "items": {
                              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "name": {
                            "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "keys"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "resources": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "description": "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.",
                    "type": "string"
                  },
                  "memory": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "The CPU and memory caps of each run's worker; a field left empty takes functions.defaultResources. Only the containerd runtime enforces them."
              },
              "runtime": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "secrets": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "description": "What the Secret is for, for the installer who provides it.",
                      "type": "string"
                    },
                    "keys": {
                      "description": "The keys read from the Secret: its data must hold each of them.",
                      "items": {
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "name": {
                      "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "keys"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sql": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "owner": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "description": "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.",
                          "enum": [
                            "Function",
                            "Lake",
                            "Job"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "description": "The workload's name, in the object's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "name"
                      ],
                      "type": "object",
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "timeout": {
                "description": "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.",
                "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                "type": "string"
              },
              "volumes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The volume's name, unique in the list; set name or ref, not both. The code reads the directory's path from FUNCD_VOLUME_<NAME>, the name or ref upper-cased.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "size": {
                      "description": "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.",
                      "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                      "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                      "type": "string"
                    },
                    "sizeBytes": {
                      "description": "The same size as a number of bytes. Set size or sizeBytes, not both.",
                      "format": "int64",
                      "minimum": 1,
                      "type": "integer"
                    },
                    "type": {
                      "description": "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.",
                      "enum": [
                        "emptyDir",
                        "local"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "kv": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "deletion": {
                "description": "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.",
                "enum": [
                  "retain",
                  "delete"
                ],
                "type": "string"
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "quota": {
                "additionalProperties": false,
                "properties": {
                  "maxBytes": {
                    "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                    "format": "int64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "maxKeyBytes": {
                    "description": "The longest key, in bytes. 0 means 1024 (1 KiB).",
                    "format": "int64",
                    "maximum": 64000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "maxSize": {
                    "description": "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.",
                    "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                    "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                    "type": "string"
                  },
                  "maxValueBytes": {
                    "description": "The largest value a write may store, in bytes. 0 means 1048576 (1 MiB).",
                    "format": "int64",
                    "maximum": 1048576,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "description": "Caps on the store's total size, on each value and on each key."
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "tables": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "name": {
                      "description": "The table's name, unique within the store.",
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "owner": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "description": "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.",
                          "enum": [
                            "Function",
                            "Lake",
                            "Job"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "description": "The workload's name, in the object's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "name"
                      ],
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "lakes": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "bindings": {
                "additionalProperties": false,
                "properties": {
                  "blob": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "alias": {
                          "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "bucket": {
                          "description": "The Bucket, in the same namespace, that holds the prefix.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "The prefix, by its name in the Bucket's prefixes.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "alias",
                        "bucket",
                        "prefix"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "config": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "secret": {
                    "description": "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.",
                    "items": {
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "blob"
                ],
                "type": "object",
                "description": "What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment."
              },
              "buckets": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "prefixes": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxObjectBytes": {
                          "description": "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.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "configMaps": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "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.",
                      "type": "object"
                    },
                    "name": {
                      "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "ingress": {
                "additionalProperties": false,
                "properties": {
                  "auth": {
                    "additionalProperties": false,
                    "properties": {
                      "mode": {
                        "description": "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.",
                        "enum": [
                          "",
                          "authenticated",
                          "open",
                          "oidc"
                        ],
                        "type": "string"
                      },
                      "provider": {
                        "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                        "maxLength": 63,
                        "minLength": 1,
                        "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                        "type": "string"
                      },
                      "unauthenticated": {
                        "description": "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.",
                        "enum": [
                          "",
                          "redirect",
                          "401",
                          "allow"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "description": "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": {
                    "description": "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.",
                    "type": "boolean"
                  },
                  "host": {
                    "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                    "type": "string"
                  },
                  "path": {
                    "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/<name>, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself."
              },
              "location": {
                "additionalProperties": false,
                "properties": {
                  "bucket": {
                    "description": "A Bucket of the same namespace.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "prefix": {
                    "description": "A prefix of that Bucket.",
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  }
                },
                "required": [
                  "bucket",
                  "prefix"
                ],
                "type": "object",
                "description": "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": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "resources": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "description": "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.",
                    "type": "string"
                  },
                  "memory": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "description": "What the Secret is for, for the installer who provides it.",
                      "type": "string"
                    },
                    "keys": {
                      "description": "The keys read from the Secret: its data must hold each of them.",
                      "items": {
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "name": {
                      "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "keys"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "paused": {
          "description": "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.",
          "type": "boolean"
        },
        "requires": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "app": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "version": {
                "description": "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.",
                "type": "string"
              }
            },
            "required": [
              "app"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "routes": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "auth": {
                "additionalProperties": false,
                "properties": {
                  "mode": {
                    "description": "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.",
                    "enum": [
                      "",
                      "authenticated",
                      "open",
                      "oidc"
                    ],
                    "type": "string"
                  },
                  "provider": {
                    "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "unauthenticated": {
                    "description": "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.",
                    "enum": [
                      "",
                      "redirect",
                      "401",
                      "allow"
                    ],
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "The edge authentication of the rules that set none. Unset uses the Namespace's spec.edgeDefaults.auth, else open."
              },
              "enabled": {
                "description": "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.",
                "type": "boolean"
              },
              "host": {
                "description": "The host the rules answer on, matched in lower case and without a port or a trailing dot. Empty is the namespace host, <namespace>.<server.baseDomain>, or, in the default namespace, every host except another namespace's own host, <other>.<server.baseDomain> 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, <other>.<server.baseDomain> or a name under it, is refused (HostReserved) while that namespace uses it, and always for a rule at or under /function.",
                "type": "string"
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "rules": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "auth": {
                      "additionalProperties": false,
                      "properties": {
                        "mode": {
                          "description": "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.",
                          "enum": [
                            "",
                            "authenticated",
                            "open",
                            "oidc"
                          ],
                          "type": "string"
                        },
                        "provider": {
                          "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "unauthenticated": {
                          "description": "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.",
                          "enum": [
                            "",
                            "redirect",
                            "401",
                            "allow"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "The edge authentication of this rule's requests. Unset uses the Route's auth, then the Namespace's spec.edgeDefaults.auth, then open."
                    },
                    "backend": {
                      "additionalProperties": false,
                      "properties": {
                        "function": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "site": {
                          "description": "A Site of this Route's namespace: the rule serves the build that Site serves now, and its config.json at <path>/config.json, following each new build. A Prefix rule; the Route may not carry the Site's own name.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "static": {
                          "additionalProperties": false,
                          "properties": {
                            "bucket": {
                              "description": "A Bucket of the Route's namespace whose objects the rule serves; the Route is not Ready (BucketNotFound) while it is missing.",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                              "type": "string"
                            },
                            "index": {
                              "description": "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 /.",
                              "type": "string"
                            },
                            "prefix": {
                              "description": "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.",
                              "type": "string"
                            },
                            "spa": {
                              "description": "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.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "bucket"
                          ],
                          "type": "object",
                          "description": "Serves the objects of a Bucket prefix directly, with no Function. It answers GET and HEAD, and 405 to any other method."
                        }
                      },
                      "type": "object",
                      "description": "What the rule serves: set exactly one of function, static and site."
                    },
                    "methods": {
                      "description": "The request methods the rule matches; empty matches every method.",
                      "items": {
                        "enum": [
                          "GET",
                          "HEAD",
                          "POST",
                          "PUT",
                          "PATCH",
                          "DELETE",
                          "OPTIONS"
                        ],
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "path": {
                      "description": "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).",
                      "type": "string"
                    },
                    "pathType": {
                      "description": "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.",
                      "enum": [
                        "",
                        "Prefix",
                        "Exact"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "path",
                    "backend"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "secrets": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "description": "What the Secret is for, for the installer who provides it.",
                "type": "string"
              },
              "keys": {
                "description": "The keys read from the Secret: its data must hold each of them.",
                "items": {
                  "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                  "type": "string"
                },
                "minItems": 1,
                "type": "array"
              },
              "name": {
                "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              }
            },
            "required": [
              "name",
              "keys"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "sensors": {
          "description": "The Sensors that the App declares or refers to; no two entries name the same one.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "do": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "function": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "input": {
                      "description": "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 ${{ }} 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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "on": {
                      "description": "The name of the dependency whose events run this action, one of the Sensor's on entries.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "workflow": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "on"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "on": {
                "description": "The events the Sensor subscribes to, as named dependencies: at least one, with unique names.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "event": {
                      "description": "The name of one of that EventSource's events, which is the type of each CloudEvent the dependency receives.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "name": {
                      "description": "The dependency's name, unique among the Sensor's dependencies; an action's on names it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "source": {
                      "description": "The name of an EventSource in the Sensor's namespace.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "source",
                    "event"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "sites": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "bindings": {
                "additionalProperties": false,
                "properties": {
                  "blob": {
                    "description": "Exactly one entry: the Bucket and the prefix that hold the Site's bundles.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "description": "The Bucket that holds the Site's bundles, in the Site's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "The prefix of that Bucket under which the Site stores each bundle, at <prefix>/sha256-<hex>/, and the config.json that runtimeConfig generates. It cannot change once the Site exists: a new prefix needs a new Site.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "bucket",
                        "prefix"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "blob"
                ],
                "type": "object",
                "description": "Where the Site stores and serves its bundles: one Bucket prefix, in blob."
              },
              "buckets": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "prefixes": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxObjectBytes": {
                          "description": "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.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "image": {
                "description": "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.",
                "type": "string"
              },
              "index": {
                "description": "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.",
                "type": "string"
              },
              "ingress": {
                "additionalProperties": false,
                "properties": {
                  "auth": {
                    "additionalProperties": false,
                    "properties": {
                      "mode": {
                        "description": "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.",
                        "enum": [
                          "",
                          "authenticated",
                          "open",
                          "oidc"
                        ],
                        "type": "string"
                      },
                      "provider": {
                        "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                        "maxLength": 63,
                        "minLength": 1,
                        "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                        "type": "string"
                      },
                      "unauthenticated": {
                        "description": "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.",
                        "enum": [
                          "",
                          "redirect",
                          "401",
                          "allow"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "description": "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": {
                    "description": "Serve a copy of the bundle's index whose <base href> is the Site's mount, so a bundle built with relative URLs runs at any path, deep links included.",
                    "type": "boolean"
                  },
                  "enabled": {
                    "description": "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.",
                    "type": "boolean"
                  },
                  "host": {
                    "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                    "type": "string"
                  },
                  "path": {
                    "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                    "type": "string"
                  },
                  "rules": {
                    "description": "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.",
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "path": {
                          "description": "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.",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "The prefix of that Bucket served at path: <path>/<key> reads the object <prefix>/<key> as the Bucket holds it, since nothing is copied.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "path",
                        "prefix"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "runtimeConfig": {
                "additionalProperties": false,
                "properties": {
                  "configMap": {
                    "description": "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.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "values": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "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.",
                    "type": "object"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "sql": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "deletion": {
                "description": "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.",
                "enum": [
                  "retain",
                  "delete"
                ],
                "type": "string"
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "owner": {
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "description": "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.",
                    "enum": [
                      "Function",
                      "Lake",
                      "Job"
                    ],
                    "type": "string"
                  },
                  "name": {
                    "description": "The workload's name, in the object's namespace.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "name"
                ],
                "type": "object",
                "description": "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": {
                "additionalProperties": false,
                "properties": {
                  "maxBytes": {
                    "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                    "format": "int64",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "maxSize": {
                    "description": "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.",
                    "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                    "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "resources": {
                "additionalProperties": false,
                "properties": {
                  "cpu": {
                    "description": "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.",
                    "type": "string"
                  },
                  "memory": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "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."
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "version": {
          "description": "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.",
          "type": "string"
        },
        "workflows": {
          "description": "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 <workflow>-<step>, a name that no functions entry or other step may take.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "buckets": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "prefixes": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxObjectBytes": {
                          "description": "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.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "configMaps": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "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.",
                      "type": "object"
                    },
                    "name": {
                      "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "contract": {
                "additionalProperties": false,
                "properties": {
                  "dialect": {
                    "description": "The URI of the JSON Schema dialect that input and output follow. funcd checks nothing against it.",
                    "type": "string"
                  },
                  "input": {
                    "description": "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": {
                    "description": "The JSON Schema of the output. A declared one must be an object, and each property it does not require must declare a default."
                  }
                },
                "type": "object",
                "description": "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": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "quota": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxKeyBytes": {
                          "description": "The longest key, in bytes. 0 means 1024 (1 KiB).",
                          "format": "int64",
                          "maximum": 64000,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        },
                        "maxValueBytes": {
                          "description": "The largest value a write may store, in bytes. 0 means 1048576 (1 MiB).",
                          "format": "int64",
                          "maximum": 1048576,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "type": "object",
                      "description": "Caps on the store's total size, on each value and on each key."
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "tables": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "description": "The table's name, unique within the store.",
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "owner": {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "description": "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.",
                                "enum": [
                                  "Function",
                                  "Lake",
                                  "Job"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "description": "The workload's name, in the object's namespace.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "kind",
                              "name"
                            ],
                            "type": "object",
                            "description": "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."
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "lakes": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "bindings": {
                      "additionalProperties": false,
                      "properties": {
                        "blob": {
                          "description": "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.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "alias": {
                                "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "bucket": {
                                "description": "The Bucket, in the same namespace, that holds the prefix.",
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "prefix": {
                                "description": "The prefix, by its name in the Bucket's prefixes.",
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "alias",
                              "bucket",
                              "prefix"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "config": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "secret": {
                          "description": "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.",
                          "items": {
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "blob"
                      ],
                      "type": "object",
                      "description": "What the Lake's engine uses: Bucket prefixes, and the ConfigMaps and Secrets of its environment."
                    },
                    "buckets": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "deletion": {
                            "description": "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.",
                            "enum": [
                              "retain",
                              "delete"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "prefixes": {
                            "description": "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.",
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "name": {
                                  "description": "The prefix's name, unique within the Bucket. Over S3, it is the first segment of each object's key.",
                                  "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                  "type": "string"
                                },
                                "owner": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "kind": {
                                      "description": "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.",
                                      "enum": [
                                        "Function",
                                        "Lake",
                                        "Job"
                                      ],
                                      "type": "string"
                                    },
                                    "name": {
                                      "description": "The workload's name, in the object's namespace.",
                                      "maxLength": 63,
                                      "minLength": 1,
                                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "name"
                                  ],
                                  "type": "object",
                                  "description": "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": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "maxBytes": {
                                      "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                      "format": "int64",
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "maxSize": {
                                      "description": "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.",
                                      "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                      "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object",
                                  "description": "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."
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "quota": {
                            "additionalProperties": false,
                            "properties": {
                              "maxBytes": {
                                "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxObjectBytes": {
                                "description": "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.",
                                "format": "int64",
                                "minimum": 0,
                                "type": "integer"
                              },
                              "maxSize": {
                                "description": "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.",
                                "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                                "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "description": "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": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "configMaps": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "data": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "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.",
                            "type": "object"
                          },
                          "name": {
                            "description": "The ConfigMap's name, at most 52 characters. It is stored as <name>-<hash of data>, and the config of each part that names it is set to that stored name.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          },
                          "ref": {
                            "description": "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.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "ingress": {
                      "additionalProperties": false,
                      "properties": {
                        "auth": {
                          "additionalProperties": false,
                          "properties": {
                            "mode": {
                              "description": "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.",
                              "enum": [
                                "",
                                "authenticated",
                                "open",
                                "oidc"
                              ],
                              "type": "string"
                            },
                            "provider": {
                              "description": "With mode oidc, the OIDCProvider of the namespace that signs callers in; required with oidc and refused with another mode.",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                              "type": "string"
                            },
                            "unauthenticated": {
                              "description": "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.",
                              "enum": [
                                "",
                                "redirect",
                                "401",
                                "allow"
                              ],
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "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.",
                          "type": "boolean"
                        },
                        "host": {
                          "description": "The exact host of the resource's own address. Empty is the namespace's host, <namespace>.<server.baseDomain>, or, in the default namespace, any host that no other namespace reserves.",
                          "type": "string"
                        },
                        "path": {
                          "description": "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/<name>, /site/<name> or /lake/<name> by kind.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "Exposes the Lake gateway at the edge, only when enabled is true and while the Lake is Ready. The path defaults to /lake/<name>, or / with a host. Setting auth is refused, since the Lake gateway checks each caller itself."
                    },
                    "location": {
                      "additionalProperties": false,
                      "properties": {
                        "bucket": {
                          "description": "A Bucket of the same namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "prefix": {
                          "description": "A prefix of that Bucket.",
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "bucket",
                        "prefix"
                      ],
                      "type": "object",
                      "description": "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": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "ref": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "description": {
                            "description": "What the Secret is for, for the installer who provides it.",
                            "type": "string"
                          },
                          "keys": {
                            "description": "The keys read from the Secret: its data must hold each of them.",
                            "items": {
                              "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                              "type": "string"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          "name": {
                            "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                            "maxLength": 63,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "name",
                          "keys"
                        ],
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "name": {
                "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "onFailure": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "pooling": {
                "additionalProperties": false,
                "properties": {
                  "minReplicas": {
                    "description": "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.",
                    "format": "int64",
                    "maximum": 15,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "mode": {
                    "description": "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.",
                    "enum": [
                      "shared",
                      "isolated"
                    ],
                    "type": "string"
                  },
                  "worker": {
                    "description": "The pool worker's name when mode is shared; empty means the Workflow's name. isolated ignores it.",
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  }
                },
                "type": "object",
                "description": "How the image steps' Functions share workers and stay warm. A step's function.pooling replaces it for that step."
              },
              "ref": {
                "description": "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.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "secrets": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "description": {
                      "description": "What the Secret is for, for the installer who provides it.",
                      "type": "string"
                    },
                    "keys": {
                      "description": "The keys read from the Secret: its data must hold each of them.",
                      "items": {
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "name": {
                      "description": "The name of a Secret in the namespace of the resource that declares it. funcd holds its value; the resource never writes it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "keys"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "sql": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "deletion": {
                      "description": "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.",
                      "enum": [
                        "retain",
                        "delete"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The object's name. It takes the namespace and resource group of the resource that declares it.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "owner": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "description": "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.",
                          "enum": [
                            "Function",
                            "Lake",
                            "Job"
                          ],
                          "type": "string"
                        },
                        "name": {
                          "description": "The workload's name, in the object's namespace.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "name"
                      ],
                      "type": "object",
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "maxBytes": {
                          "description": "The same cap as a number of bytes. Set maxSize or maxBytes, not both.",
                          "format": "int64",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "maxSize": {
                          "description": "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.",
                          "pattern": "^[0-9]{1,15}((Ki|Mi|Gi|Ti)B?)?$",
                          "patternDescription": "a size: 1 to 15 digits and an optional binary unit, Ki, Mi, Gi or Ti, with or without a B (512Ki, 2GiB)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "resources": {
                      "additionalProperties": false,
                      "properties": {
                        "cpu": {
                          "description": "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.",
                          "type": "string"
                        },
                        "memory": {
                          "description": "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.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "steps": {
                "description": "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.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "builtin": {
                      "additionalProperties": false,
                      "properties": {
                        "pass": {
                          "description": "A ${{ }} JavaScript expression whose value is the step's output, over input, the run input, and step.<name>.output of each step it follows. It is checked only when the step runs: an error fails the step. Exactly one of wait and pass.",
                          "type": "string"
                        },
                        "wait": {
                          "description": "How long the step waits before it succeeds with its input as its output: a duration such as 30s, checked at apply, or a ${{ }} expression that must yield one when the step runs. The wait counts toward the run's timeout, and a cancel ends it. Exactly one of wait and pass.",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "A step that funcd runs itself, with no Function: a wait or a pass. Exactly one of function, builtin and workflow."
                    },
                    "dependsOn": {
                      "description": "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.",
                      "items": {
                        "maxLength": 63,
                        "minLength": 1,
                        "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "function": {
                      "additionalProperties": false,
                      "properties": {
                        "bindings": {
                          "additionalProperties": false,
                          "properties": {
                            "blob": {
                              "description": "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.",
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "alias": {
                                    "description": "The binding's name, unique in the list; code that reaches the prefix through ctx.blob passes it.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "bucket": {
                                    "description": "The Bucket, in the same namespace, that holds the prefix.",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "prefix": {
                                    "description": "The prefix, by its name in the Bucket's prefixes.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "bucket",
                                  "prefix"
                                ],
                                "type": "object"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "config": {
                              "description": "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.",
                              "items": {
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "kv": {
                              "description": "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.",
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "alias": {
                                    "description": "The binding's name, unique in the list, which the code passes to ctx.kv.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "store": {
                                    "description": "The KVStore, in the same namespace, that holds the table.",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "table": {
                                    "description": "The table, by its name in the store's tables.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "store",
                                  "table"
                                ],
                                "type": "object"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "lake": {
                              "description": "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.",
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "alias": {
                                    "description": "The binding's name, unique in the list. Each worker reads the Lake's address and its token from FUNCD_LAKE_<ALIAS>_URL and FUNCD_LAKE_<ALIAS>_TOKEN, the alias upper-cased.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "lake": {
                                    "description": "The Lake to query, in the same namespace.",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "lake"
                                ],
                                "type": "object"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "secret": {
                              "description": "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.",
                              "items": {
                                "maxLength": 63,
                                "minLength": 1,
                                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                "type": "string"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            },
                            "sql": {
                              "description": "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.",
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "alias": {
                                    "description": "The binding's name, unique in the list, which the code passes to ctx.sql.",
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  },
                                  "database": {
                                    "description": "The SQLDatabase to query, in the same namespace.",
                                    "maxLength": 63,
                                    "minLength": 1,
                                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "alias",
                                  "database"
                                ],
                                "type": "object"
                              },
                              "type": [
                                "array",
                                "null"
                              ]
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "The artifact of the step's own Function, <workflow>-<step>, which funcd creates with the runtime the artifact declares and its handle export. That name must fit in 63 characters. Exactly one of image and ref.",
                          "type": "string"
                        },
                        "pooling": {
                          "additionalProperties": false,
                          "properties": {
                            "minReplicas": {
                              "description": "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.",
                              "format": "int64",
                              "maximum": 15,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "mode": {
                              "description": "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.",
                              "enum": [
                                "shared",
                                "isolated"
                              ],
                              "type": "string"
                            },
                            "worker": {
                              "description": "The pool worker's name when mode is shared; empty means the Workflow's name. isolated ignores it.",
                              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        },
                        "retry": {
                          "additionalProperties": false,
                          "properties": {
                            "backoff": {
                              "description": "The base of the exponential retry backoff: 0s to 1h; 0s or unset means workflow.defaultRetryBackoff.",
                              "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                              "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                              "type": "string"
                            },
                            "maxAttempts": {
                              "description": "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.",
                              "format": "int64",
                              "maximum": 100,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "type": "object",
                          "description": "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": {
                          "description": "The per-step invocation bound: 0s to 24h; 0s or unset means workflow.defaultStepTimeout.",
                          "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                          "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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": {
                      "description": "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.",
                      "enum": [
                        "all",
                        "any"
                      ],
                      "type": "string"
                    },
                    "name": {
                      "description": "The step's name, unique among the steps. dependsOn, onFailure, store owners and step.<name>.output in expressions refer to the step by it, and an image step's Function is named <workflow>-<step>.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                      "type": "string"
                    },
                    "params": {
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "condition": {
                          "description": "A ${{ }} JavaScript expression that yields true or false, over input, the run input, and step.<name>.output of each step it follows. It is type-checked against the steps' contracts before the Workflow is Ready; one that cannot be evaluated when the step is reached fails the run.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "condition"
                      ],
                      "type": "object",
                      "description": "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": {
                      "additionalProperties": false,
                      "properties": {
                        "ref": {
                          "description": "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.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "description": "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."
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "timeout": {
                "description": "The wall-clock bound on a whole run, paused time excluded: 0s to 168h; 0s or unset means no bound.",
                "pattern": "^([0-9]+h([0-9]+m)?([0-9]+s)?([0-9]+ms)?|[0-9]+m([0-9]+s)?([0-9]+ms)?|[0-9]+s([0-9]+ms)?|[0-9]+ms)$",
                "patternDescription": "a duration: whole numbers with the units h, m, s and ms, largest unit first (10m, 1h30m, 500ms)",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "properties": {
        "children": {
          "description": "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.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "kind": {
                "description": "The object's kind.",
                "type": "string"
              },
              "name": {
                "description": "The object's name: a ref entry's target, and for a defined ConfigMap its stored name.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "reason": {
                "description": "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/<name> <key>. 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: <Kind>/<name>.",
                "type": "string"
              },
              "state": {
                "description": "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.",
                "enum": [
                  "Ready",
                  "NotStarted",
                  "Pending",
                  "Lagging",
                  "Pruning"
                ],
                "type": "string"
              }
            },
            "required": [
              "kind",
              "name",
              "state"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "conditions": {
          "description": "The conditions that explain the phase.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "lastTransitionTime": {
                "description": "When the status last changed.",
                "format": "date-time",
                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
                "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
                "type": "string"
              },
              "message": {
                "description": "A sentence that explains the status.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "The object's generation when funcd set the condition.",
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "description": "A short CamelCase reason for the status.",
                "type": "string"
              },
              "status": {
                "description": "Whether the condition holds.",
                "type": "string"
              },
              "type": {
                "description": "What the condition reports, such as Ready.",
                "type": "string"
              }
            },
            "required": [
              "type",
              "status"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "currentRevision": {
          "description": "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.",
          "maxLength": 63,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
          "type": "string"
        },
        "lagEndedAt": {
          "description": "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.",
          "format": "date-time",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
          "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
          "type": "string"
        },
        "lastSelfHeal": {
          "additionalProperties": false,
          "properties": {
            "at": {
              "description": "When funcd wrote it back.",
              "format": "date-time",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
              "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
              "type": "string"
            },
            "kind": {
              "description": "The kind of the part written back.",
              "type": "string"
            },
            "name": {
              "description": "The name of the part written back.",
              "maxLength": 63,
              "minLength": 1,
              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name",
            "at"
          ],
          "type": "object",
          "description": "The last part that funcd wrote back after another writer changed or deleted it, and when."
        },
        "latestRevision": {
          "description": "The newest AppRevision, created for the latest spec. It differs from currentRevision while a rollout waits or runs, and after one fails.",
          "maxLength": 63,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
          "type": "string"
        },
        "observedGeneration": {
          "description": "The generation of the spec that funcd last acted on.",
          "format": "int64",
          "type": "integer"
        },
        "phase": {
          "description": "Where the object is in its lifecycle.",
          "enum": [
            "Pending",
            "Deploying",
            "Ready",
            "Idle",
            "Degraded",
            "Failed",
            "Terminating"
          ],
          "type": "string"
        },
        "plan": {
          "additionalProperties": false,
          "properties": {
            "hooks": {
              "description": "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.",
              "items": {
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "parts": {
              "description": "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.",
              "items": {
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "description": "What the write would do to the object. Empty on the line of a declared Secret where the rollout would stop.",
                    "enum": [
                      "create",
                      "update",
                      "prune"
                    ],
                    "type": "string"
                  },
                  "kind": {
                    "description": "The object's kind.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The object's name; for a defined ConfigMap, its stored name.",
                    "maxLength": 63,
                    "minLength": 1,
                    "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                    "type": "string"
                  },
                  "reason": {
                    "description": "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.",
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "name"
                ],
                "type": "object"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "revision": {
              "description": "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.",
              "maxLength": 63,
              "minLength": 1,
              "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
              "type": "string"
            }
          },
          "type": "object",
          "description": "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": {
          "description": "The Apps of this namespace whose spec.requires names this App, sorted by name.",
          "items": {
            "maxLength": 63,
            "minLength": 1,
            "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "requires": {
          "description": "The state of each spec.requires entry, in its order.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "app": {
                "description": "The required App, as its spec.requires entry names it.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
                "type": "string"
              },
              "met": {
                "description": "Whether the required App exists, has a spec.version the range accepts, and is Ready with that spec rolled out.",
                "type": "boolean"
              },
              "version": {
                "description": "The required App's spec.version, empty when it sets none or does not exist.",
                "type": "string"
              }
            },
            "required": [
              "app",
              "met"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "version": {
          "description": "The spec.version of the current revision.",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "metadata",
    "spec",
    "apiVersion",
    "kind"
  ],
  "type": "object"
}
```

## Answers

| Status | Problem type | When | What to do |
| --- | --- | --- | --- |
| 200 |  | OK |  |
| 400 | `urn:funcd:problem:invalid` | A field breaks a rule that the schema cannot hold, which the detail names. | Correct the field that the detail names. |
| 400 | `urn:funcd:problem:invalid` | The body's metadata.namespace is not the namespace of the path. | Send the object to the path of its own namespace. |
| 400 | `about:blank` | The body is missing or is not JSON. | Send a JSON body. |
| 400 | `urn:funcd:problem:invalid` | A Function, a Lake or a Workflow's image step of the App binds a Secret that spec.secrets does not declare. | Declare the Secret in spec.secrets, or remove it from the bindings. |
| 400 | `urn:funcd:problem:invalid` | A ref entry names an object that the App of this name controls, such as a part that an earlier spec declared by name. | Declare it by name instead; to keep a store as a ref, apply the App with the store's deletion set to retain first. |
| 400 | `urn:funcd:problem:invalid` | The App's spec.requires would close a cycle among the namespace's Apps, such as an App that requires itself. | Remove a requirement of the cycle. |
| 400 | `urn:funcd:problem:invalid` | A part breaks a rule that a write of its kind is held to, such as a Function's link to a Function that neither the App nor the namespace holds; the detail names the part's entry, such as spec.functions[0]. | Correct that entry as the detail says. |
| 401 | `urn:funcd:problem:unauthorized` | The request carries no bearer token or API key, or one that funcd does not know. | Send a credential of funcd's config as a bearer token in the Authorization header, or in X-Api-Key. |
| 403 | `urn:funcd:problem:forbidden` | The credential's role or namespaces do not allow it to create an App in the namespace. | Use a credential whose role allows it, such as a developer of the namespace or an admin. |
| 409 | `urn:funcd:problem:conflict` | An App of that name already exists in the namespace. | Choose another name, or replace the existing App. |
| 409 | `urn:funcd:problem:conflict` | A part conflicts with what the namespace or funcd holds, as a write of its kind would, such as a Function's local volume that does not fit in volumes.capacity; the detail names the part's entry. | Resolve what the detail names, then apply the App again. |
| 413 | `urn:funcd:problem:payload-too-large` | The body is larger than 1 MiB. | Send a smaller body. |
| 415 | `about:blank` | The Content-Type of the body is not JSON. | Send the body as application/json. |
| 422 | `about:blank` | The query holds a parameter that the operation does not take. | Send only the parameters that the operation lists. |
| 422 | `about:blank` | The dryRun parameter is neither true nor false. | Send dryRun=true, or leave it out. |
| 422 | `about:blank` | The namespace in the path is not a DNS-1123 label. | Use at most 63 lowercase letters, digits and hyphens, starting and ending with a letter or a digit. |
| 422 | `about:blank` | The body breaks the schema: a field that it does not know, of the wrong type or past its limits. | Correct the field at the location that the detail gives. |