Hi, Let us understand how to create different versions of charts and add it as a part of the repository.
Let me get into the chart that we had created.
So within the chart folder I will be having chart.yaml
I'm going to open the chart.yaml file. Here
I do have a field called version.
This is going to define what version of the chart that we are working on
And the same version will get updated within the repository as well.
And the version syntax will be followed using the semver.org that is semantic versioning
And more details about semantic versioning can be found over here. This is very simple.
Almost all the packages and softwares follow the same logic of major version, minor version
And the patch. Now for understanding purpose
I'm going to update the patch from zero to one and there will be another version
This is for the application what version of application getting deployed
And whenever I'm making changes to the application, I will be making the incremental changes to this
particular app version. And these are all the mandatory fields.
Now, I am going to update the description as well.
So that we will have clear information when we are listing that chart versions within the repository.
Let me save the changes. Now I am going to package this particular chart.
I will use the command helm package and then the folder where we do have the charts.
Now, if I look into the directory it will create another package with the version appended to that
particular chart name and this is the latest tar file.
Now, I can add this particular chart file into the repository using curl command.
curl command it's going to leverage the rest API and it'll trigger the /API/charts and add the charts into it or manually
I can go ahead and copy this particular charts into the storage location.
So the chart is added using the curl command
data binary and name of the chart and the location where we do have the repository.
Now, let me go ahead and list the repositories.
So if I search the repository only the latest version would get listed. The latest version
It is still 0.1 because it's going to search from the local cache and it needs to update from
the server. Let me go ahead and do an update. So I'll provide the command
helm repo update. So it's going to connect to the server and check
Is there any new charts available
And if it is available, it is going to refresh the local repository.
Now let me go ahead and search the repository.
Here we do have the new version that we had uploaded as a part of the repository and the description
also got updated. In case if I wanted more information about this particular chart that is in terms of what are all the
list or versions that is the older version as well
I can use the option -l, helm search repo -l and name of the repository.
So I do have two versions. The first version is 0.1.0 and the next version is 0.1.1
And I do have the corresponding description as well.
So now it should give better clarity where
I can have a repository and I can add more charts into it.
Now I can add another chart as well.
Let me go ahead and create a new chart added to it so that we can have much better clarity where
the repository can have a collection of charts that we will be doing it in another lecture where
I will create another chart and add it into the repository and verify how a repository can manage multiple charts.