ASP.NET Core chart preview
Use this pattern when an HTTP API must return rendered YAML but must not create a release or contact a cluster.
Packages
Install HelmSharp.Chart and HelmSharp.Engine. The endpoint resolves chart and values identifiers through application-owned catalogs, then creates a HelmTemplateRenderer.
Request flow
- Authenticate the caller and validate its chart and values identifiers.
- Resolve identifiers to application-authorized content.
- Load the chart, merge values, and render with explicit Kubernetes capability inputs.
- Return YAML and, when needed, notes in a separate response field.
- Record the chart version and effective inputs if a later approval can deploy the preview.
The full code is in Build a render-preview endpoint.
Do not cross the boundary
Do not accept caller-provided file paths, create a HelmClient lifecycle request, or apply the rendered manifest in this endpoint. An approval-to-deployment workflow needs immutable inputs and release-state controls; use Turn a review into a deployment for that case.