Maintain Multiple Charts


Maintain Multiple Charts

In this tutorial, we are going to discuss about how to maintain multiple helm charts in repository. Now let us create another chart and add it as a part of the repository and understand how repository can handle multiple charts.

Let me go ahead and create a new chart with name myrepo.

[email protected]:~/helm_repo_demo$ helm create myrepo
Creating myrepo

[email protected]:~/helm_repo_demo$ ls
myrepo  repotest  repotest-0.1.0.tgz  repotest-0.1.1.tgz

So I should have another folder myrepo as a part of the location where I created the chart. Let me get into the folder and modify the Chart.yaml file.

[email protected]:~/helm_repo_demo/myrepo$ cat Chart.yaml 
apiVersion: v2
name: myrepo
description: My another helm chart
type: application
version: 0.1.0
appVersion: "1.16.0"

Now, I’m going to package this particular chart using the package command.

[email protected]:~/helm_repo_demo$ helm package myrepo/
Successfully packaged chart and saved it to: /home/ashok/helm_repo_demo/myrepo-0.1.0.tgz

So it’s going to create the zipped content. Now, let’s understand what happens if I copy this particular zip file into the repository storage.

As I mentioned earlier, the storage could be a GitHub or Amazon S3 bucket or even any other cloud storage. In this case it’s a local storage. So I can move this particular file using SSH or some other option.

Since the ChartMuseum repository running in the virtual machine, I can use the scp command. So I’m going to copy this particular zipped content into the location where the Chart Museum is pointing to for the storage.

[email protected]:~/helm_repo_demo$ scp myrepo-0.1.0.tgz [email protected]:/home/ashok/chartstorage/
Authorized uses only. All activity may be monitored and reported. 
[email protected]'s password: 
myrepo-0.1.0.tgz                                     100% 3595     6.6MB/s   00:00                                                                                                          

Now, if I check this particular folder location I should have this particular zipped content as well.

[email protected]:~/chartstorage$ ls
index-cache.yaml  myrepo-0.1.0.tgz  repotest-0.1.0.tgz  repotest-0.1.1.tgz

So I do have it, now let me go ahead and update the repository.

[email protected]:~/helm_repo_demo$ helm repo update
Hang tight while we grab the latest from your chart repositories…
…Successfully got an update from the "mychartmuseumrepo" chart repository
…Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈

Now, let me search repository.

[email protected]:~/helm_repo_demo$ helm search repo mychartmuseumrepo -l
NAME                            CHART VERSION   APP VERSION     DESCRIPTION                                 
mychartmuseumrepo/myrepo        0.1.0           1.16.0          My another helm chart                       
mychartmuseumrepo/repotest      0.1.1           1.16.0          Repo demo in helm using ChartMuseum to 0.1.1
mychartmuseumrepo/repotest      0.1.0           1.16.0          Repo demo in helm using ChartMuseum 

Now, I do have the other chart as well. That is myrepo as a part of the other chart. This is the chart that we had added manually by copying the file into the storage location.

Summary

So this is a quick example on how I can manage multiple charts and another way of copying the chart package into the storage location and automatically ChartMuseum going to pick this and make it available for the helm clients.

Maintain Multiple Charts


Scroll to top