跳转到内容
AggregaAggrega
选择语言: 简体中文
本页面由机器翻译。阅读英文原文。

Aggrega 依赖锁文件(Manifest)schema

自动生成的参考文档。请勿手动编辑——请从发布的 JSON Schema 重新生成。

Schema id:https://aggrega.ai/schemas/manifest-v1beta1.schema.json

一个单一的全局锁文件,按类型将抽象的 component 和 Feature 类型映射到具体的 Recipe 和 FeatureRecipe 实现,并支持按名称进行逐实例覆盖。

有关编写 Manifest 实体的说明,请参阅 Manifest 编写参考;本页记录该参考所描述的结构化 schema。

顶层类型: object

属性

属性类型必需描述
apiVersionconst “aggrega.ai/v1beta1”是常量:"aggrega.ai/v1beta1"
kindconst “Manifest”是常量:"Manifest"
metadataobject是
defsstring[]否可选块,用于标准 YAML 锚点(& 和 *),使 Manifest 保持 DRY,同时为编译器维持扁平的 O(1) 字典。
specobject是该 Manifest 的映射声明及可选的基础继承:mappings 将抽象的 component 和 feature 类型连接到具体的 Recipe 和 FeatureRecipe 实现;extends 从基础 Manifest 继承映射。

不允许其他属性。

manifest.metadata

属性类型必需描述
namestring是长度至少为 1 个字符。
versionstring是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-]+)*))?$。
descriptionstring否说明该实体是什么、用于什么,面向正在决定是否使用它的人。先用一句话点明它是什么,再补充读者正确选择和使用它所需的信息——它对使用它的 Release 有什么要求,以及它的行为中任何出人意料之处。通常写一小段即可。
maintainersobject[]否拥有此实体的维护者列表。
licensestring否此实体所描述软件的许可证 SPDX 标识符,例如 MIT 或 AGPL-3.0。它记录的是该软件的条款,而不是此文件的条款。
repositorystring否源文件所在 Git 仓库的 URL。
homestring否此实体的主页、wiki 或文档的 URL。
keywordsstring[]否用于提升 UI 可发现性的描述性关键字列表。

不允许其他属性。

manifest.metadata.maintainers[]
属性类型必需描述
namestring是
emailstring否
urlstring否

不允许其他属性。

manifest.spec

该 Manifest 的映射声明及可选的基础继承:mappings 将抽象的 component 和 feature 类型连接到具体的 Recipe 和 FeatureRecipe 实现;extends 从基础 Manifest 继承映射。

属性类型必需描述
extendsstring否要从中继承映射的基础 Manifest 的 URI。对于同一个键,子级的映射会替换基础的映射。
mappingsobject是将抽象接口映射到具体实现。在顶层键 ‘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。

属性类型必需描述
componentsmapping_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 使用同一名称时必须这样做;有歧义的裸引用会明确地中止解析,而不是静默地选取其中一个。
featuresmapping_tier否Feature-type 到 FeatureRecipe URI 的映射。同时包括运维 Features 和凭据 Features(标记为 feature.aggrega.ai/kind: secret)。

键: "components"、"features" 之一。

不允许其他属性。

定义

mapping_tier

两层解析:‘type’ 按目录类型映射(DRY 批量),‘name’ 按实例名称映射(细粒度覆盖)。两者均为可选,但至少须存在一个。解析时 name 优先于 type。带版本的 type 键优先于无版本的键。

属性类型必需描述
typemap of string否将目录类型 URI 映射到 Recipe URI。支持带版本的键(‘core/api-server:1.0.0’)进行精确匹配,范围键(‘core/api-server:^1.0.0’)进行主版本兼容匹配,或无版本的键(‘core/api-server’)匹配任意版本。
namemap of string否将特定实例名称映射到 Recipe URI。优先于基于类型的映射。
annotationsmap of object否由注解驱动的 Feature 快捷方式。将注解键映射到一个 Feature URI,外加一张按 pillar 分组的路由表,将点分路径子键路由到 Feature pillar(values 或 infra)。校验依据目标 Feature 的 spec.schema.. 声明;该绑定只声明路由。‘feature’ 所引用的 Feature URI 也必须出现在 ‘type’ 部分中(FeatureRecipe 版本绑定位于该处)。

不允许其他属性。