Every pull request to the master branch trigger the following tests:
- ct lint
- ct install
If you're submitting a PR, and you want to ensure your changes will pass automated testing (above), here are your options:
We use helm's chart-testing tool to lint our charts. The tool can be installed locally, or it can be run in a Docker container.
To run in Docker:
- Have Docker installed
- Run
.ci/scripts/local-ct-lint.sh
To run locally:
- Have ct installed (Get a binary package from https://github.com/helm/chart-testing/releases)
- Run
ct lint --config=.ci/ct-config.yaml
ct can also test a chart by deploying it to a temporary namespace in a Kubernetes cluster, and waiting for indications that the deployment has been successful. This is a good way to test how the deployment behaves "for real".
ct lint --config=.ci/ct-config.yaml
Create a KinD cluster, by running kind create cluster
:
❯ kind create cluster
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.17.0) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Have a nice day! 👋
Trigger a ct install
test against the KinD cluster, by running t install --config=.ci/ct-config.yaml
. ct will target your current context (be careful if you've got multiple contexts configured!), create a temporary namespace, and deploy the chart into that namespace, until helm --wait
indicates success. After this, the helm release will be removed, the namespace deleted, and you can retire your KinD cluster by running kind delete cluster
.