helm-rs
A typed Rust API for Helm 4.
helm-rs drives Helm and never reimplements its engine. Anything Helm defines by a file format or data is read natively in Rust:
- charts (directories and archives),
.helmignore, archive digests and a content digest of a loaded chart; - values schemas, with validation;
- release records, including reading them straight from the cluster;
- rendered manifests and repository indexes;
- Helm-compatible version constraints.
Anything defined by Helm's behaviour goes through a backend: rendering, coalescing values, dependencies, hooks, and install, upgrade and wait.
use ;
use ;
async
Features
| Feature | What it adds |
|---|---|
cli (default) |
Cli, the backend that runs the helm binary (Helm 4.0 or newer) |
mock |
Mock, a scriptable backend for testing code built on helm-rs |
kube |
Native reads that need a cluster: release storage and typed manifest objects |
schema-remote-refs |
Resolve http(s):// and file:// $refs in values schemas, as Helm does |
The backend is a type parameter of Helm<B>, so the choice is made at compile time. A command a
backend does not support is a compile error, not a runtime one.
Coverage
Every command and flag of the Helm 4.3 CLI that a program can drive is a typed command
(completion and help are excluded). docs/cli-coverage.md tracks
each flag.
Secrets never reach the command line:
- the kube token travels in
HELM_KUBETOKEN; - registry and repository passwords go through stdin or a private
0600temporary config; - values given from Rust are written to
0600temporary files.
Tests
cargo nextest run --all-features runs the pure tests. The tests that need the real helm
binary, an OCI registry or a kind cluster are ignored by default; tests/README.md
says how to run them.
License
Licensed under either of Apache License, Version 2.0 or MIT license, at your option.
Releasing
Releases use release-plz. Every push to master opens or updates a
release PR with the next version and changelog. The version follows the conventional commits and a
cargo-semver-checks run against the last published version, so a breaking API change can't ship
as a patch. Merging the release PR publishes that version to crates.io and creates the
v<version> tag and the GitHub release.
- Release branches: work to try before it ships collects on a
release/<name>branch, named after what it brings (release/chart-digest), or after its version when that is decided (release/1.0.0, for a major release). It merges intomasterlike any PR. - Pre-release: run the Release workflow from the Actions tab on the release branch with a
label (
rcby default). It publishes the branch as<version>-rc.<n>, such as0.2.0-rc.1, from apre-release/v0.2.0-rc.1branch, with a tag and a GitHub pre-release. The version is the branch's own when its name is one, otherwise the one the release PR would propose for it. Neither the release branch normasterever holds a pre-release version.
.github/workflows/release.yaml lists the secrets the workflow
needs.