3

Issue itself

Got an Azure Container registry as both image and chart storage. Assume it myacr.azurecr.io with 8 different charts pushed. As far as I read before Azure ACR is capable of storing charts and compatible with Helm 3 (version 3.5.2).

enter image description here The following steps to reproduce are simple.

  1. helm repo add myacr https://myacr.azurecr.io/helm/v1/repo --username myusername -password admin123 - repo added. OK.
  2. helm chart save ./my-chart/ myacr.azurecr.io/helm/my-chart:1.0.0 - chart saved. OK
  3. helm push ./my-chart/ myacr.azurecr.io/helm/my-chart:1.0.0 - pushed. Available in Azure portal. OK.
  4. helm repo update - what could go wrong here? As expected. OK
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "jetstack" chart repository
...Successfully got an update from the "myacr" chart repository
Update Complete. ⎈Happy Helming!⎈
  1. helm search repo -l - I see everything from ingress-nginx and jetstack but nothing from myacr in the list. Yet if I do pull and export everything works fine - chart is in place

What I tried

  • renaming repo name to helm/{app} according to some theories in the web - fail
  • reconfiguring chart with full descriptions e.t.c. according to ingress-nginx - fail
  • executing helm search repo -l --devel to see all possible chart versions - no luck
  • "Swithing off and on again" - removing and adding repo again with different combinations - fail
  • explicit slang language on every attempt - warms up a bit but doesn't solve the issue

The questions are

  1. Is Azure ACR fully compatible with Helm 3?
  2. Is there any specific workaround to make it compatible with Helm 3?
  3. Does search functionality have any requirements to chart structure or version?
Artem Fomin
  • 123
  • 8
  • So it looks like `helm search` pulls the index.yaml file from the remote repo, saves it locally (at ~/.cache/helm/repository), and does a search based on the saved index file. It looks like `helm chart push` does NOT update the index.yaml. From my read of documentation around the new OCI-compliant helm repos, it looks like they are moving away from index.yaml files altogether. – mmking Mar 10 '21 at 19:50
  • So that would explain why helm search doesn't work this way but works when you do `az acr helm push` (because the az cli explicitly regenerates index.yaml). – mmking Mar 10 '21 at 19:51
  • New helm search would have to check against ~/.cache/helm/registry/cache/index.json instead – mmking Mar 10 '21 at 19:56

1 Answers1

1

Is Azure ACR fully compatible with Helm 3?

Yes, it's fully compatible with Helm 3.

Is there any specific workaround to make it compatible with Helm 3?

Nothing needs to be done because the first question is yes.

Does search functionality have any requirements to chart structure or version?

You need to first to add the repo to your local helm with the command az acr helm repo add --name myacr or helm repo add myacr https://myacr.azurecr.io/helm/v1/repo --username xxxxx --password xxxxxx, and then you get the output like this running the command helm search repo -l:

enter image description here

And the local repo looks like this:

enter image description here

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • My bad - haven't mention the step in question (will edit), but of course I've added the repo. After this answer removed it and added it with credentials and without. Still empty chart list from exactly this one. I see all charts from `ingress-nginx` and `jetstack`. Also tried `helm search repo -l --devel` to include all existing versions. No luck, bu thank you anyway – Artem Fomin Mar 10 '21 at 07:31
  • @ArtemFomin How do you push the charts to the ACR? Do you use the Azure CLI and do you check the ACR if the charts already in it? – Charles Xu Mar 10 '21 at 07:35
  • Nope. No Azure CLI. Only using Helm tools. `helm save ..`, then `helm push ...` as described – Artem Fomin Mar 10 '21 at 07:41
  • @ArtemFomin Do you check if the charts are in the ACR? – Charles Xu Mar 10 '21 at 07:42
  • 1
    Of course. They are in the ACR in Azure portal and ACR recognizes them as Helm charts. – Artem Fomin Mar 10 '21 at 07:44
  • @ArtemFomin Can you share the screenshots of you the charts in the ACR and the repos in your local? Maybe the command `az acr helm list --name myacr` will help. – Charles Xu Mar 10 '21 at 07:45
  • Shared the screenshot in initial question. `az acr helm list --name myacr` returns empty list and warns again that `This command is implicitly deprecated because command group 'acr helm' is deprecated and will be removed in a future release. Use 'helm v3' instead` – Artem Fomin Mar 10 '21 at 07:56
  • @ArtemFomin It means the chart does not exist in the ACR. You can use the command `az acr helm push --name myacr example.tgz` tp push the chart to ACR. And then search the chart with the helm command. And try to update the repo with the command `helm repo update`. – Charles Xu Mar 10 '21 at 08:00
  • As mentioned above `command group 'acr helm' is deprecated` so even if this one helps soon it would removed and makes sense to understand why Helm 3 CLI doesn't perform as expected. Pipeline actually works - I just pull and export the chart then use it as file, but the clean way is to install it directly from ACR without playing around with temporary solutions. – Artem Fomin Mar 10 '21 at 08:06
  • @ArtemFomin You can understand the example [here](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos) just use the ACR as a repository to store the chart and it's different like the chart repository. You can use the parameter `--debug` after the command `az acr helm push` to see the difference. Maybe Azure will make it work only with the Helm command later, but now, it works as I said. – Charles Xu Mar 10 '21 at 08:26
  • @ArtemFomin Any updates on this question? – Charles Xu Mar 12 '21 at 07:55
  • Not really. According to [MS article](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos) this feature is not enabled in ACR currently. MS Support says the same – Artem Fomin Mar 18 '21 at 15:26
  • @ArtemFomin So I give the right answer. If you don't mind, please accept it. – Charles Xu Mar 19 '21 at 01:41