Helm Chart Template Notes


Helm Chart Template Notes

In this tutorial, we are going to discuss about template notes in helm chart and how to include notes for a chart.

As we discussed earlier, within the templates folder there could be three different type of files templates file as such that’s going to be the manifest for Kubernetes. And NOTES.txt that’s going to have the notes for the file and other helper templates.

Within the NOTES.txt I can give the instructions on what are all the notes that should get displayed once the chart is deployed. This can act as another template where the normal template syntax can be included within the notes as well.

For example, I can access the global built in objects as well as the other rules of templates like looping everything works within the notes as well.

Generally this will be displayed whenever I am going to do a dry run or any deployment of the helm chart. This notes will get displayed in the end so that that will be useful for the users to understand what are all the instructions or the steps to follow further once the release is made.

Example

Let’s go ahead and create a sample notes. Within templates I’m going to create a file called NOTES.txt. Let me include a sample content.

[email protected]:~/mychart/templates$ cat NOTES.txt 
Thank you for support {{ .Chart.Name }}.
Your release is named {{ .Release.Name }}.
To learn more about the release, try:
  $ helm status {{ .Release.Name }}
  $ helm get all {{ .Release.Name }}
  $ helm uninstall {{ .Release.Name }}

So here I am including some of the template derivative and some instructions. So that this particular instructions are these six lines will get displayed once the release is done.

Let me go ahead and do the installation of the chart.

[email protected]:~$ helm install notesdemo ./mychart/
NAME: notesdemo
LAST DEPLOYED: Mon May 24 15:00:21 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing mychart.
Your release is named notesdemo.
To learn more about the release, try:
  $ helm status notesdemo
  $ helm get all notesdemo
  $ helm uninstall notesdemo

The chart got deployed and the instructions that we provided as a part of the notes that is getting displayed.

This is the place where we will provide the connection configurations in case if I am providing any database or deploying any database, I can provide the user ID, passwords or anything that I am generating as a part of the template.

So that that will be useful for the users further to understand what got deployed as well as how to connect to those resources and how to make use of those resources. And what are all the care to be taken, especially when that particular release is made.

Please note that it is always recommended to have a clear notes on each and every charts.

Helm Chart Template Notes


Scroll to top