Helm utils template definitions for Deckhouse modules.
See list of definitions here
Use the following instruction to update lib-helm in the Deckhouse repo.
You can install library as helm dependency:
dependencies:
- name: deckhouse_lib_helm
version: 1.0.1
repository: https://deckhouse.github.io/lib-helmlib-helm tries to collect documentation for the every define and put documentation into the README file of a chart.
Documentation of the define consists of the following sections:
- The name of the define.
- The description of the define.
- Usage example of the define.
- Arguments description of the define.
We use a naive algorithm to extract documentation.
We split tpl file by line. Each line is checked for a define definition using a regular expression.
If define is found, we look for all consecutive comments above define.
All the comments found except those that start with the Usage: become The description of the define.
Comments starting with Usage: become Usage example of the define.
After it, we look for all consecutive comments beyond the define.
Every found comment becomes Arguments description of the define.
See helm_lib_pod_anti_affinity_for_ha for example.
We use the name of the tpl file with the following transformation for the category of definitions:
the '_' symbol is replaced by the space symbol,
the first letter of each word is capitalized, and spaces from either side of a result are ignored.
E.g., _foo_bar.tpl converts to Foo Bar.
If you change or add definition documentation comment, you should rebuild README.md with documentation. Use the following command (Go should be installed):
make doc/build
- Create a new branch from the
mainbranch. - Modify templates.
- In Charts.yaml increase the minor version (maj.min.patch) in case of non-significant changes or the major version otherwise.
- Create and merge PR to the
mainbranch. The new chart release will be created after merging the PR.
- Create branch from the
mainbranch. - Fix bug in templates.
- Increase a patch version (maj.min.patch) in Charts.yaml.
- Create and merge PR to the
mainbranch. The new chart release will be created after merging the PR. - Create a new branch from the release branch (
release-maj.min). - Cherry pick commit with the fix from the
mainto the new branch. - Create and merge PR to the release branch (
release-maj.min).
- Create a new branch from the release branch (
release-X.X). - Cherry pick commit from the
mainbranch. - Increase a patch version for X.X release (X.X.patch) in Charts.yaml.
- Create and merge PR to the release branch (
release-X.X). The new chart release will be created after merging the PR.
See this document.