首页 > 解决方案 > 添加到 ACR 的 Helm 图表的索引 URL 是什么?

问题描述

我正在关注指南,了解如何“将 Helm 图表推送和拉取到 Azure 容器注册表”。

所以我把一张图表推到了ACR。我可以通过 Azure UI 和

az acr repository show \
  --name mycontainerregistry \
  --repository helm/hello-world

是否有一个存储库 URL 可用于配置其他人(在本例中为 Flux v2)以从中提取图表?我认为它可能是https://mycontainerregistry.azurecr.io/helm/v1/repo/index.yaml,但它没有列出我推送的图表。

我必须做些什么才能将我的图表添加到index.yaml,或者我应该使用另一个 URL?

编辑

我刚刚意识到这https://mycontainerregistry.azurecr.io/helm/v1/repo/index.yaml将显示通过az acr helm push命令推送的图表。所以也许那个 URL 是别的东西?

标签: kubernetes-helmazure-container-registryfluxcd

解决方案


实际上,您可以使用该命令helm repo add将 Azure Container Registry 作为存储库添加到 helm,然后您可以从 ACR 中拉取图表。ACR 中的所有图表都已命名myacr.azurecr.io/helm/chartname,这意味着您将从 ACR 中提取图表。名称决定图表的来源。

例如,您在此处使用以下命令添加 repo:

helm repo add technosophos https://technosophos.github.io/tscharts

你可以像这样显示回购:

在此处输入图像描述

然后你可以从这个 repo 中提取图表:

舵拉

你可以用 ACR 做这样的事情。helm 将帮助您更新 repo 的索引。你不需要自己做。


推荐阅读