2 unstable releases

new 0.4.0 Apr 13, 2025
0.1.0 Dec 21, 2024

#180 in Visualization

Download history 53/week @ 2024-12-15 39/week @ 2024-12-22 18/week @ 2025-02-09 7/week @ 2025-02-16 1/week @ 2025-02-23

95 downloads per month

MIT/Apache

40KB
861 lines

helm-wrapper-rs

Helm wrapper library for Rust.

Commands supported:

  • List releases
  • Install chart (through helm upgrade --install)
  • Uninstall chart
  • Safety mode (by default). Don't log sensitive data.

Getting started

[dependencies]
helm-wrapper-rs = { version = "0.4.0", features = ["blocking"] }
use crate::blocking::DefaultHelmExecutor;

let helm_executor = DefaultHelmExecutor::new();

helm_executor.uninstall("namespace", "release")?;

helm_executor.install_or_upgrade(
    namespace,
    release_name,
    chart_name,
    chart_version,
    values_overrides,
    values_file,
    helm_options,
)?;

let releases = helm_executor.list_releases()?;

helm_executor.uninstall("namespace", "release")?;

println!("{:?}", releases);

Features

  • blocking (default)
  • nonblocking

Mock

Add blocking-mock or nonblocking-mock features:

helm-wrapper-rs = { version = "0.4.0", features=["blocking-mock"] }

Then use MockHelmExecutor.

Run integration tests

What tests do:

  • Install whoami helm chart
  • Get information about installed charts (helm releases)
  • Uninstall whoami helm chart

Kubernetes cluster is required. You can use K3s:

curl -sfL https://get.k3s.io | sh -
chown $USER: /etc/rancher/k3s/k3s.yaml
chmod g-r /etc/rancher/k3s/k3s.yaml

export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

Run tests:

cargo test --no-default-features --features "blocking"
cargo test --no-default-features --features "nonblocking"

RoadMap

  • Strict type checking with nutype

Dependencies

~0.7–7MB
~55K SLoC