2

I am faced with a situation where I need to use JFrog Artifactory as a Helm Registry. I have got the Helm Chart ready with me and have added the Helm Repo using the helm repo add command. However, while trying to push the chart to JFrog Registry. I am faced with the error - 404 unable to pass JSON.

Can we use JFrog Remote Repositories as Helm Registries? If yes can someone point towards the working JFrog Docs?

Currently, I am using the helm cm-push plugin to push the chart.tgz files to registry. This is working if I want to push to Gitlab Registry but doesn't seem to be working for Artifactory Repo. Can we use cm-push plugin to push to JFrog Helm Registry?

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • What type of repository is created on Artifactory? A correct flow requires the creation of a remote Repository with repoType Helm (proxy and cache). Take a look here: https://jfrog.com/help/r/jfrog-artifactory-documentation/kubernetes-helm-chart-repositories – glv Apr 04 '23 at 19:59

1 Answers1

0

So first lets clarify the following helm supports helm-chart repositories (repository docs) as well as the so called the oci-based registries registry docs.

Jfrog artifactory supports both.

The first is supported through the so called "Kubernetes Helm Chart Repositories" docs. This type is supported from all versions of the helm you can push there either by curl or the jf cli tool.

The sesond is supported through the artifactory docker registry (docs) the reigstry is oci-compliant so you can push there helm-charts as well. For that you can use the native helm push command. For helm >= 3.8.

Both type of repositories support remote repositories/registries.

If the above are not clear enough feel free to come back for examples.

So an example for the oci-registry would look like (also docs)

helm registry login -u jfroguser my-artifactory.int:5000
helm push mychart-0.1.0.tgz oci://my-artifactory.int:5000/helm-charts
zochamx
  • 850
  • 8
  • 17
  • Hi @zochamx. Thanks for the explanation. Can you point me to example articles following the 2nd approach? – Mayank Singh Rathore Apr 05 '23 at 05:48
  • Hi @Mayank I updated the answer with an example from the docs. – zochamx Apr 06 '23 at 18:27
  • Still doesn't seem to work. `$ helm repo list` `NAME URL` `helm https://rathoremayank.jfrog.io/artifactory/api/helm/helm` `$ helm registry login -u career.mayankrathore@gmail.com -p oci://rathoremayank.jfrog.io/artifactory/api/helm/` `WARNING: Using --password via the CLI is insecure. Use --password-stdin.` `INFO[0000] Error logging in to endpoint, trying next endpoint error="Get` `\"https://oci/v2/\": dial tcp: lookup oci on 8.8.8.8:53: no such host"` `Error: Get "https://oci/v2/": dial tcp: lookup oci on 8.8.8.8:53: no such host` `$` ` – Mayank Singh Rathore Apr 07 '23 at 11:00
  • Is it true that JFrog doesnt support any native helm push plugins? – Mayank Singh Rathore Apr 07 '23 at 11:08
  • You are trying to push to an artifactory helm repository. That is not possible with helm push. Create an artifactory docker registry and try to push there. – zochamx Apr 07 '23 at 21:20
  • I want to use Artifactory Repo as the helm repo. – Mayank Singh Rathore Apr 11 '23 at 05:06
  • The approach you chose is to use the artifactory registry as a helm repository. If you have a working docker registry in artifactory you can `helm push` there your helm charts. – zochamx Apr 13 '23 at 07:07