Aggrega 依赖锁文件(Manifest)schema
自动生成的参考文档。请勿手动编辑——请从发布的 JSON Schema 重新生成。
Schema id:https://aggrega.ai/schemas/manifest-v1beta1.schema.json
一个单一的全局锁文件,按类型将抽象的 component 和 Feature 类型映射到具体的 Recipe 和 FeatureRecipe 实现,并支持按名称进行逐实例覆盖。
有关编写 Manifest 实体的说明,请参阅 Manifest 编写参考;本页记录该参考所描述的结构化 schema。
顶层类型: object
属性
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
apiVersion | const “aggrega.ai/v1beta1” | 是 | 常量:"aggrega.ai/v1beta1" |
kind | const “Manifest” | 是 | 常量:"Manifest" |
metadata | object | 是 | |
defs | string[] | 否 | 可选块,用于标准 YAML 锚点(& 和 *),使 Manifest 保持 DRY,同时为编译器维持扁平的 O(1) 字典。 |
spec | object | 是 | 该 Manifest 的映射声明及可选的基础继承:mappings 将抽象的 component 和 feature 类型连接到具体的 Recipe 和 FeatureRecipe 实现;extends 从基础 Manifest 继承映射。 |
不允许其他属性。
manifest.metadata
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
name | string | 是 | 长度至少为 1 个字符。 |
version | string | 是 | manifest 锁文件的严格语义化版本(例如 1.0.0)。模式:^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$。 |
description | string | 否 | 说明该实体是什么、用于什么,面向正在决定是否使用它的人。先用一句话点明它是什么,再补充读者正确选择和使用它所需的信息——它对使用它的 Release 有什么要求,以及它的行为中任何出人意料之处。通常写一小段即可。 |
maintainers | object[] | 否 | 拥有此实体的维护者列表。 |
license | string | 否 | 此实体所描述软件的许可证 SPDX 标识符,例如 MIT 或 AGPL-3.0。它记录的是该软件的条款,而不是此文件的条款。 |
repository | string | 否 | 源文件所在 Git 仓库的 URL。 |
home | string | 否 | 此实体的主页、wiki 或文档的 URL。 |
keywords | string[] | 否 | 用于提升 UI 可发现性的描述性关键字列表。 |
不允许其他属性。
manifest.metadata.maintainers[]
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
name | string | 是 | |
email | string | 否 | |
url | string | 否 |
不允许其他属性。
manifest.spec
该 Manifest 的映射声明及可选的基础继承:mappings 将抽象的 component 和 feature 类型连接到具体的 Recipe 和 FeatureRecipe 实现;extends 从基础 Manifest 继承映射。
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
extends | string | 否 | 要从中继承映射的基础 Manifest 的 URI。对于同一个键,子级的映射会替换基础的映射。 |
mappings | object | 是 | 将抽象接口映射到具体实现。在顶层键 ‘components’ 和 ‘features’ 下声明映射,各自将 component 类型 / feature 类型 URI 直接映射到 Recipe / FeatureRecipe URI。这两个键就是全部接口面;此处不接受其他任何键。在 Manifest 层,映射与 capability 无关——capability 的确定在 Aggrega 构建 Release 时来自每个已解析 Recipe 的 spec.capability。键:"components"、"features" 之一。 |
不允许其他属性。
manifest.spec.mappings
将抽象接口映射到具体实现。在顶层键 ‘components’ 和 ‘features’ 下声明映射,各自将 component 类型 / feature 类型 URI 直接映射到 Recipe / FeatureRecipe URI。这两个键就是全部接口面;此处不接受其他任何键。在 Manifest 层,映射与 capability 无关——capability 的确定在 Aggrega 构建 Release 时来自每个已解析 Recipe 的 spec.capability。
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
components | mapping_tier | 否 | Component-type 到 Recipe URI 的映射。一个 Recipe URI 最多包含两个段——一个可选的前导 capability,然后是 recipe 名称——外加一个可选的版本;带有第三个段的引用不会匹配任何 recipe。版本形式:精确版本(‘postgres-bitnami:1.2.0’)、范围(‘postgres-bitnami:^1.2.0’)或无版本(‘postgres-bitnami’);解析器在首次解析时将解析出的版本固定在锁文件中。引用还可以带 capability 限定(‘terraform/mariadb-rds:1.0.0’,第一个 ’/’ 之前的段指明该 recipe 的 spec.capability)——当多个 recipe 使用同一名称时必须这样做;有歧义的裸引用会明确地中止解析,而不是静默地选取其中一个。 |
features | mapping_tier | 否 | Feature-type 到 FeatureRecipe URI 的映射。同时包括运维 Features 和凭据 Features(标记为 feature.aggrega.ai/kind: secret)。 |
键: "components"、"features" 之一。
不允许其他属性。
定义
mapping_tier
两层解析:‘type’ 按目录类型映射(DRY 批量),‘name’ 按实例名称映射(细粒度覆盖)。两者均为可选,但至少须存在一个。解析时 name 优先于 type。带版本的 type 键优先于无版本的键。
| 属性 | 类型 | 必需 | 描述 |
|---|---|---|---|
type | map of string | 否 | 将目录类型 URI 映射到 Recipe URI。支持带版本的键(‘core/api-server:1.0.0’)进行精确匹配,范围键(‘core/api-server:^1.0.0’)进行主版本兼容匹配,或无版本的键(‘core/api-server’)匹配任意版本。 |
name | map of string | 否 | 将特定实例名称映射到 Recipe URI。优先于基于类型的映射。 |
annotations | map of object | 否 | 由注解驱动的 Feature 快捷方式。将注解键映射到一个 Feature URI,外加一张按 pillar 分组的路由表,将点分路径子键路由到 Feature pillar(values 或 infra)。校验依据目标 Feature 的 spec.schema. |
不允许其他属性。