Using this repository
To install a Helm chart from this repository first add the repository:
helm repo add lsstts https://lsst-ts.github.io/charts/
helm repo update
Installing charts
Use the helm install
command to install the charts:
helm install lsstts/mychart --name myrelease
See the Helm Documentation for more information.
Adding a new chart to this repository
This command will create a collection of files that defines your chart:
helm create mychart
Templates
Helm finds the YAML definitions for your Kubernetes objects in the templates/
directory. Helm runs each file in this directory through a Go template rendering engine.
Values
The values.yaml
file defines the defaults for each template variable.
Documentation
Another useful file in the templates/
directory is the NOTES.txt
file. It is a templated, plaintext file that gets printed out after the chart is successfully deployed.
Debugging your chart
As you develop your chart, it’s a good idea to run it through the linter to ensure you’re following best practices and that your templates are well-formed:
helm lint mychart
A convenient command to debug your new chart is:
helm install --dry-run --debug mychart
Packaging your chart
Your chart will be packaged and released automatically once the chart has been merged into the master
branch.
This is done via a GitHub Action configured in .github/workflows/release.yaml
.
The release will then be automatically added to the repository index at https://lsst-ts.github.io/charts/.
Re-adding an old chart
Any old charts that were not current when this repository was converted to autom ated releases are not published or in the index. However, it may be necessary to go back and republish old charts to revert changes. Here is the (fairly manual) process for doing that.
- Find the old released chart.
This should be available in an old Git revision.
It will be a file named
<chart>-<version>.tgz
. - Create a new Git tag at the revision from which you’re pulling the chart.
The tag should be
<chart>-<version>
. Push that tag to GitHub. - Create a new GitHub release from that tag and upload the
.tgz
file (originally generated byhelm release
) as an artifact for that tag. The description of the release is the description line from the Helm chart. - Get a copy of chart-releaser.
You can download the
cr
binary or use the process documented there to build it yourself. - Check out the
gh-pages
branch of thelsst-ts/charts
repository. - Create a directory named
.cr-release-packages
and put the.tgz
file of the chart you want to restore in that directory. - Run
cr index -i index.yaml -o lsst-ts -r charts -c https://lsst-ts.github.io/charts/
. - Verify the resulting
index.yaml
file contains the restored chart metadata and no other changes (in particular, that it’s not missing any other chart metadata that was previously there). - Commit and push the
index.yaml
file.
⎈ Happy Helming!⎈