1
00:00:00,000 --> 00:00:05,966
Hi

2
00:00:05,966 --> 00:00:11,099
In the earlier lecture, we discussed about various components involved as a part of helm.

3
00:00:11,100 --> 00:00:17,566
Now it's time to get more in detail about the charts, how to create a custom chart and the syntax and

4
00:00:17,566 --> 00:00:20,299
the various components within the charts.

5
00:00:20,300 --> 00:00:23,633
This is going to be the main section within this particular course where

6
00:00:23,633 --> 00:00:28,933
We are going to have detailed discussion about each and every component within chart.

7
00:00:28,933 --> 00:00:33,433
For that, I'm going to create a custom project and get more in

8
00:00:33,433 --> 00:00:38,899
details about various files available as a part of the charts and how to make use of them.

9
00:00:38,900 --> 00:00:43,233
Then we will start creating a chart from the scratch.

10
00:00:43,233 --> 00:00:48,133
Let me get into the machine where I do have the helm installed. Here

11
00:00:48,133 --> 00:00:54,799
I will be issuing the command helm create mychart

12
00:00:54,800 --> 00:00:58,366
So it's going to create a chart with the name mychart

13
00:00:58,366 --> 00:01:02,332
And that will be put within a folder called mychart

14
00:01:02,333 --> 00:01:04,899
So here mychart folder got created.

15
00:01:04,900 --> 00:01:09,966
If I get into this specific folder, I will be having all the basic required files.

16
00:01:09,966 --> 00:01:16,466
And this by default, create a small chart with sample deployment, services everything.

17
00:01:16,466 --> 00:01:19,299
What I will be doing, I will use this specific structure

18
00:01:19,300 --> 00:01:22,666
Then we will create a chart from the scratch.

19
00:01:22,666 --> 00:01:29,466
Before that, let me get into the different folders and see what are all information will be available within it.

20
00:01:29,466 --> 00:01:35,832
The very basic thing of charts is the templates that will be put within the templates folder if I get

21
00:01:35,833 --> 00:01:41,166
into the templates folder I will be having some sample templates, for time being

22
00:01:41,166 --> 00:01:45,966
Let's not worry about these templates which got created by default for understanding purposes

23
00:01:45,966 --> 00:01:53,966
Let me cat a sample deployment.yaml file

24
00:01:53,966 --> 00:02:00,099
It's going to have the deployment.yaml file, which is templatised, for example within name

25
00:02:00,100 --> 00:02:07,000
I do have a variable which will be read from some value files or from some other chart template.

26
00:02:07,000 --> 00:02:09,333
Don't worry about this particular syntax, what it is

27
00:02:09,333 --> 00:02:13,666
We will be having detailed discussion about each and every component of it.

28
00:02:13,666 --> 00:02:17,332
This is just to have a feel, how a template would look like.

29
00:02:17,333 --> 00:02:21,199
And within the charts folder, we will be having all the dependent charts

30
00:02:21,200 --> 00:02:23,966
This particular main charts depends on

31
00:02:23,966 --> 00:02:28,699
And this particular folder is empty and within values.yaml file

32
00:02:28,700 --> 00:02:36,300
This is going to provide the values for the templates and we can have hierarchical value, this is of json format.

33
00:02:36,300 --> 00:02:39,833
I can read any value using the key hierarchy

34
00:02:39,833 --> 00:02:45,166
We will be having detailed discussion on how to read a specific value or array of values later point

35
00:02:45,166 --> 00:02:52,499
of time and chart.yaml we will be having various information like what API version, name, description

36
00:02:52,500 --> 00:02:53,866
These three fields are mandatory

37
00:02:53,866 --> 00:02:58,099
Additional to that, we can have other fields like keywords

38
00:02:58,100 --> 00:03:03,333
type, what kube version to use and different dependencies we can add.

39
00:03:03,333 --> 00:03:06,633
And who is the maintainer and all those values are optional.

40
00:03:06,633 --> 00:03:11,333
While discussing about this specific file chart.yaml we will be having detailed discussion about

41
00:03:11,333 --> 00:03:15,933
each and every field what will get added into this particular file.

42
00:03:15,933 --> 00:03:24,633
So like this, we can have other files as well, like license, readme.md, values.yaml, values.schema.json

43
00:03:24,633 --> 00:03:28,333
crds folder and templates. So license

44
00:03:28,333 --> 00:03:32,866
It's an optional file that's going to have the license information about this particular chart and readme

45
00:03:32,866 --> 00:03:35,999
As the name suggests, it's a human readable text file where

46
00:03:36,000 --> 00:03:41,366
We will be having information about this particular chart and values.schema.json

47
00:03:41,366 --> 00:03:44,232
It's an optional file, but that's a very important file where

48
00:03:44,233 --> 00:03:50,233
It is going to derive or drive how the structure of the values.yaml file will be

49
00:03:50,233 --> 00:03:57,199
That is something like a schema definition file and another folder that we did not see it in the default chart that got created

50
00:03:57,200 --> 00:04:03,100
That is crds that's going to have the customer resources that are required for this particular
chart.

51
00:04:03,100 --> 00:04:06,933
So we use the chart create command to create the chart

52
00:04:06,933 --> 00:04:13,866
And I am going to use this same folder structure and go ahead and create the chart from the beginning

53
00:04:13,866 --> 00:04:17,432
for that particular purpose I will be removing this folder.

54
00:04:17,433 --> 00:04:23,899
That is the templates folder and all its content so that I can create everything right from the beginning.

55
00:04:23,900 --> 00:04:28,433
So within templates, I do not have any content, within charts also, we don't have any content.

56
00:04:28,433 --> 00:04:34,199
So I will be going ahead and modifying the charts.yaml and values.yaml file and start

57
00:04:34,200 --> 00:04:37,600
creating our first template in our next lecture.

58
00:04:37,600 --> 00:04:43,900
So in a quick summary, we discussed about how to use helm create chart command and create the file

59
00:04:43,900 --> 00:04:49,633
structure so that we can start proceeding from this particular point to create our own custom chart.

