You can prepare a chart using one of the following methods:
For details about how to create a chart, see https://helm.sh/docs/chart_template_guide/getting_started/.
tar pzcf {name}-{version}.tgz {name}/
In the preceding command,
{name} indicates the actual chart name.
{version} indicates the actual chart version.
The values of {name} and {version} must be the same as the values of name and version in the Chart.yaml file in the chart.
In the preceding command, replace {name} with the actual chart name.
This section uses the redis chart as an example to illustrate the chart specifications.
A chart package is named in the format of {name}-{version}.tgz, where {version} indicates the version number in the format of Major version number.Minor version number.Revision number, for example, redis-0.4.2.tgz.
The chart name {name} can contain a maximum of 64 characters.
The version number must comply with the semantic versioning rules.
The directory structure of a chart is as follows:
redis/ templates/ values.yaml README.md Chart.yaml .helmignore
Parameter |
Description |
---|---|
* templates |
Stores all templates. |
* values.yaml |
Describes configuration parameters required by templates. NOTICE:
Make sure that the image address set in the values.yaml file is the same as the image address in the container image repository. Otherwise, an exception occurs when you create a workload, and the system displays a message indicating that the image fails to be pulled. To obtain the image address, perform the following operations: Log in to the CCE console. In the navigation pane, choose Image Repository to access the SWR console. Choose My Images > Private Images and click the name of the uploaded image. On the Image Tags tab page, obtain the image address from the pull command. You can click |
README.md |
A markdown file, including:
|
* Chart.yaml |
Basic information about the chart. |
.helmignore |
Files or data that does not need to read templates during workload installation. |