HelmSharp.Release 1.2.0

dotnet add package HelmSharp.Release --version 1.2.0
                    
NuGet\Install-Package HelmSharp.Release -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HelmSharp.Release" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HelmSharp.Release" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="HelmSharp.Release" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HelmSharp.Release --version 1.2.0
                    
#r "nuget: HelmSharp.Release, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HelmSharp.Release@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HelmSharp.Release&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=HelmSharp.Release&version=1.2.0
                    
Install as a Cake Tool

<h1 align="center"> <img src="https://raw.githubusercontent.com/GaTTGeng/HelmSharp/master/docs/public/wordmark.svg" alt="HelmSharp" width="352"> </h1>

CI NuGet NuGet Downloads License

简体中文

HelmSharp is a managed .NET library for rendering Helm-style charts and driving Kubernetes release workflows without invoking the helm executable. It is intended for applications that need Helm-like behavior inside a .NET process: template rendering, values merging, chart packaging, repository operations, and release lifecycle operations against Kubernetes.

The project is under active development. M1 (Helm template parity) and M2 (chart packaging and repository parity) are complete, with the renderer continuously checked against focused fixtures and selected public Helm charts. Later milestones expand release lifecycle and Kubernetes operations.

The latest published version is 1.2.0. The M2 packaging, repository, pull, and dependency capabilities described below and in the linked distribution guide are available in the 1.2.0 NuGet packages.

Documentation site: https://gattgeng.github.io/HelmSharp/

The documentation now includes workflow guides, realistic integration examples, package-by-package guidance, and generated API reference pages for public types and members.

Packages

This repository is organized as several NuGet packages:

Package Purpose
HelmSharp.Action High-level Helm client API and release operations.
HelmSharp.Chart Chart loading, values merging, YAML helpers, chart metadata.
HelmSharp.Engine Helm-style template rendering.
HelmSharp.Kube Kubernetes manifest apply/delete/wait helpers.
HelmSharp.Release Helm release storage records backed by Kubernetes Secrets.
HelmSharp.Repo Chart repository, index, pull, and search helpers.
HelmSharp.Registry Registry-related extension point package.
HelmSharp.Storage Storage extension point package.
HelmSharp.PostRenderer Post-renderer extension point package.

For most applications, start with HelmSharp.Action.

Requirements

  • .NET 8, .NET 9, and .NET 10 SDKs for building all target frameworks locally.
  • A Kubernetes cluster and kubeconfig for release install, upgrade, rollback, uninstall, and status operations.
  • No helm binary is required.
  • Supported package target frameworks: net8.0, net9.0, and net10.0.
  • .NET Framework is not supported unless a future release adds a netstandard target.

Installation

dotnet add package HelmSharp.Action

For lower-level use cases:

dotnet add package HelmSharp.Chart
dotnet add package HelmSharp.Engine

Quick Start

Render a local chart:

using HelmSharp.Action;

var client = new HelmClient(new StaticHelmOptionsProvider());

var result = await client.TemplateAsync(new HelmTemplateRequest
{
    ReleaseName = "demo",
    Namespace = "default",
    Chart = @"C:\charts\my-chart",
    SetValues = new Dictionary<string, string>
    {
        ["image.tag"] = "1.2.3",
        ["replicaCount"] = "2"
    }
});

Console.WriteLine(result.StandardOutput);

sealed class StaticHelmOptionsProvider : IHelmOptionsProvider
{
    public ValueTask<HelmExecutionOptions> GetHelmAsync(CancellationToken cancellationToken = default)
        => ValueTask.FromResult(new HelmExecutionOptions
        {
            DefaultNamespace = "default",
            FieldManager = "helmsharp"
        });
}

More complete examples are available in examples.

Install or upgrade a release:

var result = await client.UpgradeInstallAsync(new HelmUpgradeInstallRequest
{
    ReleaseName = "demo",
    Namespace = "default",
    Chart = @"C:\charts\my-chart",
    CreateNamespace = true,
    Wait = true,
    TimeoutSeconds = 300
});

if (result.ExitCode != 0)
{
    Console.Error.WriteLine(result.StandardError);
}
else
{
    Console.WriteLine(result.StandardOutput);
}

Run a dry run without mutating the cluster:

await foreach (var line in client.UpgradeInstallStreamAsync(new HelmUpgradeInstallRequest
{
    ReleaseName = "demo",
    Namespace = "default",
    Chart = @"C:\charts\my-chart",
    DryRun = true
}))
{
    Console.WriteLine(line);
}

Supported Capabilities

The list below describes the current master branch. See the version note above before using M2 APIs from NuGet.

  • Chart loading from directories and .tgz archives.
  • values.yaml, inline values, --set, --set-string, --set-json, and --set-file-style value overrides.
  • Helm-style template rendering for common control flow and functions.
  • Helm-compatible chart packaging with .helmignore, version/appVersion overrides, dependencies, and safe archive layout.
  • Traditional HTTP repository config/cache management, index generation/merge, offline search, semantic-version pull, digest verification, and safe extraction.
  • Dependency list/update/build with Helm-compatible Chart.lock, repository aliases, chart aliases, and local file:// dependencies.
  • Managed Kubernetes apply/delete/wait operations for common Kubernetes resources.
  • Release history stored in Kubernetes Secrets.
  • Install, upgrade, uninstall, rollback, status, history, manifest, values, hooks, notes, and test-oriented APIs.

See the chart packaging and repository workflow guide for complete examples. OCI/provenance parity remains planned separately.

Compatibility Validation

HelmSharp's template engine is continuously validated with golden tests. The suite includes focused fixture charts and selected public Helm charts. Each public chart below is rendered by both helm template (reference) and HelmSharp's managed renderer; outputs are compared document-by-document after normalization.

These results are a compatibility signal for the pinned chart versions in the table, not a blanket certification for every chart in the Helm ecosystem. Validate your own chart when it relies on uncommon Helm behavior.

Last updated: 2026-07-16 · HelmSharp version: 1.2.0 · Helm version: v4.2.2 · Test framework: net10.0

Summary

Chart Version Helm Docs Templates Passed Failed Per-Template Rate Full Render Verdict
podinfo 6.14.0 5 21 21 0 100% ✅ Success Pass
metrics-server 3.13.1 9 18 18 0 100% ✅ Success Pass
external-dns 1.21.1 5 7 7 0 100% ✅ Success Pass
ingress-nginx 4.12.1 19 42 42 0 100% ✅ Success Pass
cert-manager 1.17.1 52 41 41 0 100% ✅ Success Pass
Total 90 129 129 0 100%

Per-Chart Breakdown

podinfo          █████████████████████  100%  (21/21 templates)
metrics-server   █████████████████████  100%  (18/18 templates)
external-dns     █████████████████████  100%  ( 7/ 7 templates)
ingress-nginx    █████████████████████  100%  (42/42 templates)
cert-manager     █████████████████████  100%  (41/41 templates)
                 ─────────────────────
                 █████████████████████  100%  (129/129 templates overall)

Error Analysis

For the pinned public charts listed above, all 129 templates render without parser exceptions and match helm template after normalization. This is the current compatibility signal for the covered charts, not a guarantee that every Helm chart uses only covered behavior.

Key parity milestones closed since the 1.0.3 release:

  • #109 / #111 / #113 — Block right-trim now preserves action-line indent matching Go text/template behavior; cert-manager golden test restored from 45/52 to 52/52 exact match.
  • #112ParseDefine now applies right-trim to define body, matching ParseBlock behavior.
  • #97 — Completed Sprig function parity for remaining gaps (empty, keys, mergeOverwrite, mustRegexMatch, mustRegexReplaceAll, etc.).
  • #102 — Resolved cert-manager remaining content diffs (YAML tag, octal values, merge keys, block scalars, comment trimming).
  • #96 / #99 / #108 — Resolved selected public-chart golden test content diffs to achieve Pass verdicts across all five charts.

Verdict Legend

Verdict Meaning
Pass The tested chart output is byte-for-byte identical after normalization (line endings, source comments).
Partial Structurally compatible — same document count, or most individual templates render correctly while a few hit known parser gaps.
Fail The renderer cannot produce output for any template in this chart.

Known Scope

HelmSharp is not a full Helm CLI clone. Some advanced Helm behaviors, edge-case template functions, plugins, provenance verification flows, OCI authentication flows, and uncommon Kubernetes resource types may need additional implementation. Contributions that add compatibility with focused tests are welcome.

Documentation

Build

dotnet restore HelmSharp.sln
dotnet build HelmSharp.sln --configuration Release --no-restore
dotnet test HelmSharp.sln --configuration Release --no-build --no-restore

Pack

dotnet pack HelmSharp.sln --configuration Release --no-build --output artifacts/packages

The NuGet package metadata is defined in src/Directory.Build.props. The package README is packed from this file.

Continuous Integration and Release

This repository includes GitHub Actions workflows:

  • .github/workflows/ci.yml restores, builds, tests, packs, and uploads package artifacts on pushes and pull requests.
  • .github/workflows/deploy-docs.yml builds the VitePress documentation site and deploys it to GitHub Pages on pushes to master.
  • .github/workflows/release-nuget.yml packs release packages and can publish them to NuGet.org.

NuGet.org publishing is handled by maintainers through the release workflow.

Contributing

See CONTRIBUTING.md.

Security

Please report security issues privately. See SECURITY.md.

License

HelmSharp is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on HelmSharp.Release:

Package Downloads
HelmSharp.Storage

Managed Helm-compatible chart renderer and Kubernetes release deployer for .NET

HelmSharp.Action

Managed Helm-compatible chart renderer and Kubernetes release deployer for .NET

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 50 7/17/2026
1.1.1 124 7/14/2026
1.1.0 140 6/30/2026
1.0.4 149 6/23/2026
1.0.3 145 6/22/2026
1.0.2 142 6/20/2026
1.0.1 146 6/17/2026

See CHANGELOG.md for release notes and known scope.