Install helm charts from OCI-based registries using Artifactory remote repositories

ARTIFACTORY: How to manage Helm charts in OCI based registries using Artifactory

AuthorFullName__c
Shisiya Sebastian
articleNumber
000005859
ft:sourceType
Salesforce
FirstPublishedDate
2023-09-07T12:35:47Z
lastModifiedDate
2023-12-20
VersionNumber
10
Dockerhub supports OCI artifacts, and in some cases, stores Helm charts wrapped as OCI. You can create a remote docker repository with the upstream URL of “https://registry-1.docker.io/ ” and use that repository with your helm v 3.8.0 + commands to pull images from the OCI registry. 

To install a Helm chart from DockerHub: 
In this example, you will pull a Helm Chart called bitnamicharts/redis from DockerHub.

1. Create a docker remote repository in Artifactory, say oci-test-docker-remote, with the URL “https://registry-1.docker.io/ ”.
 
User-added image



2.Log in to your Helm OCI client using helm registry login command: 

Make sure to replace the placeholder in ​bold​​ with your own JFrog host domain.
helm registry login ​<YOUR_JFROG_DOMAIN>​​

For example: 
$ helm registry login acme.jfrog.io
Username: admin
Password:
        Login Succeeded

3. Now pull a Helm chart image using the Artifactory remote repository or the respective virtual repository URL (here ‘oci-test-docker’ is my virtual docker repository)
  
Make sure to replace the placeholders in ​bold​​ with your own JFrog domain, repository name, and chart name. Specifying the version is optional.
 
helm pull 
oci://​​<YOUR_JFROG_DOMAIN>​​/​<REPOSITORY_NAME>​​/​<CHART_NAME>​​ --version=<VERSION> 

For example:
$ helm pull 
oci://acme.jfrog.io/helm-oci-remote/bitnamicharts/redis
Pulled: acme.jfrog.io/helm-oci-remote/bitnamicharts/redis:18.3.3
Digest:
sha256:b3b87725110b01f901c50cd638d082f51e8a1b7bd519fd9d34721c78659c7192

4. You can find that the OCI image is cached in the Artifactory remote repository cache.

User-added image

5.  You can install it using Helm directly from Artifactory using the following command:

Make sure to replace the placeholders in ​bold​​ with your deployment name, domain name, and OCI image path.  Specifying the version is optional.
 
helm install <DEPLOYMENT_NAME> oci://<ARTIFACTORY_HOST>/<REPOSITORY_KEY>/<CHART_NAME>
--version=<VERSION>
For example: 
$ helm install redis-local oci://acme.jfrog.io/helm-oci-remote/bitnamicharts/redis
Pulled: acme.jfrog.io/helm-oci-remote/bitnamicharts/redis:18.3.3
Digest: sha256:b3b87725110b01f901c50cd638d082f51e8a1b7bd519fd9d34721c78659c7192
NAME: redis-local
LAST DEPLOYED: Fri Aug  4 16:53:17 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: redis
CHART VERSION: 18.3.3
APP VERSION: 7.0.12
** Please be patient while the chart is being deployed **