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),
.helmignoreand digests; - 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
master always holds the latest stable release. Each release is prepared on a
release/<version> branch, such as release/0.1.0, which collects the work for that version.
- Pre-release: run the Release workflow from the Actions tab on the release branch with a
version such as
0.1.0-rc.1. It commits the version and changelog to the branch and publishes that version to crates.io at once, with av0.1.0-rc.1tag and a GitHub pre-release. - Stable: run the workflow on the release branch with the stable version, such as
0.1.0. It commits the version and changelog only. Merging the branch intomaster(rebase or squash) publishes it and creates the tag and the GitHub release.
CI's version check keeps pre-release versions off master, and holds a release branch back until
its stable version is set. .github/workflows/release.yaml lists the
secrets the workflow needs.