Help us learn about your current experience with the documentation. Take the survey.

Helm API

  • 版本:Free, Premium, Ultimate
  • 产品:GitLab.com, GitLab Self-Managed, GitLab Dedicated

这是 Helm 的 API 文档。

此 API 供 Helm 相关的包客户端(例如 Helmhelm-push)使用,通常不建议手动调用。

有关如何从 GitLab 包仓库上传和安装 Helm 包的说明,请参阅 Helm 仓库文档

这些终端节点不遵循标准的 API 身份验证方法。 有关支持的请求头和令牌类型的详细信息,请参阅 Helm 仓库文档。 未来可能会移除未公开的身份验证方法。

下载 Chart 索引

下载 Chart 索引:

GET projects/:id/packages/helm/:channel/index.yaml
属性 类型 必需 描述
id string yes 项目的 ID 或完整路径。
channel string yes Helm 仓库的通道。
curl --user <username>:<personal_access_token> \
     "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml"

将输出写入文件:

curl --user <username>:<personal_access_token> \
     "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml" \
     --remote-name

下载 Chart

下载 Chart:

GET projects/:id/packages/helm/:channel/charts/:file_name.tgz
属性 类型 必需 描述
id string yes 项目的 ID 或完整路径。
channel string yes Helm 仓库的通道。
file_name string yes Chart 文件名。
curl --user <username>:<personal_access_token> \
     "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/charts/mychart.tgz" \
     --remote-name

上传 Chart

上传 Chart:

POST projects/:id/packages/helm/api/:channel/charts
属性 类型 必需 描述
id string yes 项目的 ID 或完整路径。
channel string yes Helm 仓库的通道。
chart file yes Chart(以 multipart/form-data 格式)。
curl --request POST \
     --form '[email protected]' \
     --user <username>:<personal_access_token> \
     "https://gitlab.example.com/api/v4/projects/1/packages/helm/api/stable/charts"