helm-wrapper-rs

Crates.iohelm-wrapper-rs
lib.rshelm-wrapper-rs
version
sourcesrc
created_at2024-12-21 15:20:22.738935+00
updated_at2025-04-13 18:41:46.318776+00
descriptionHelm wrapper library for Rust
homepagehttps://github.com/lebe-dev/helm-wrapper-rs
repositoryhttps://github.com/lebe-dev/helm-wrapper-rs
max_upload_size
id1491079
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Eugene Lebedev (lebe-dev)

documentation

README

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
Commit count: 24

cargo fmt