<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation on helm-schema</title><link>https://romnn.github.io/helm-schema/docs/</link><description>Recent content in Documentation on helm-schema</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://romnn.github.io/helm-schema/docs/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://romnn.github.io/helm-schema/docs/introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/introduction/</guid><description>&lt;h1 id="introduction"&gt;Introduction&lt;a class="anchor" href="#introduction"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; generates a &lt;strong&gt;JSON Schema&lt;/strong&gt; for a Helm chart&amp;rsquo;s &lt;code&gt;values.yaml&lt;/code&gt; by &lt;strong&gt;statically analyzing the chart&amp;rsquo;s templates&lt;/strong&gt;. You point it at a chart directory (or a packaged &lt;code&gt;.tgz&lt;/code&gt;), and it prints a Draft-07 schema:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;helm-schema ./mychart --output mychart/values.schema.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Helm reads a &lt;code&gt;values.schema.json&lt;/code&gt; placed next to &lt;code&gt;values.yaml&lt;/code&gt; automatically and validates user-supplied values against it during &lt;code&gt;install&lt;/code&gt;, &lt;code&gt;upgrade&lt;/code&gt;, &lt;code&gt;lint&lt;/code&gt;, and &lt;code&gt;template&lt;/code&gt;. A good schema turns a class of &amp;ldquo;it rendered, but wrong&amp;rdquo; mistakes into an error at submit time.&lt;/p&gt;</description></item><item><title>Installation</title><link>https://romnn.github.io/helm-schema/docs/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/installation/</guid><description>&lt;h1 id="installation"&gt;Installation&lt;a class="anchor" href="#installation"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; is a single self-contained binary. There is nothing to configure to get started — the Kubernetes and CRD schemas it consults are fetched on demand and cached.&lt;/p&gt;
&lt;h2 id="homebrew"&gt;Homebrew&lt;a class="anchor" href="#homebrew"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install --cask romnn/tap/helm-schema&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This installs a prebuilt binary from the &lt;a href="https://github.com/romnn/homebrew-tap"&gt;&lt;code&gt;romnn/homebrew-tap&lt;/code&gt;&lt;/a&gt; tap. Prebuilt binaries are published for Linux (&lt;code&gt;x86_64&lt;/code&gt;, &lt;code&gt;aarch64&lt;/code&gt;), macOS (Intel, Apple Silicon), and Windows (&lt;code&gt;x86_64&lt;/code&gt;, &lt;code&gt;aarch64&lt;/code&gt;).&lt;/p&gt;
&lt;h2 id="from-cratesio"&gt;From crates.io&lt;a class="anchor" href="#from-cratesio"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The CLI ships from the &lt;code&gt;helm-schema-cli&lt;/code&gt; crate. The binary it installs is named &lt;code&gt;helm-schema&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Quick start</title><link>https://romnn.github.io/helm-schema/docs/quick-start/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/quick-start/</guid><description>&lt;h1 id="quick-start"&gt;Quick start&lt;a class="anchor" href="#quick-start"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;This walks through a first run and how to read the output. It assumes &lt;code&gt;helm-schema&lt;/code&gt; is &lt;a href="https://romnn.github.io/helm-schema/docs/installation/"&gt;installed&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="1-point-it-at-a-chart"&gt;1. Point it at a chart&lt;a class="anchor" href="#1-point-it-at-a-chart"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The only required argument is the chart — a directory or a packaged &lt;code&gt;.tgz&lt;/code&gt;/&lt;code&gt;.tar.gz&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;helm-schema ./mychart&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The generated schema is written to &lt;strong&gt;standard output&lt;/strong&gt; by default, so you can redirect it or inspect it directly. To write it where Helm will find it, use &lt;code&gt;--output&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;helm-schema ./mychart --output mychart/values.schema.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Helm automatically validates values against a &lt;code&gt;values.schema.json&lt;/code&gt; next to &lt;code&gt;values.yaml&lt;/code&gt; on &lt;code&gt;install&lt;/code&gt;, &lt;code&gt;upgrade&lt;/code&gt;, &lt;code&gt;lint&lt;/code&gt;, and &lt;code&gt;template&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>How it works</title><link>https://romnn.github.io/helm-schema/docs/how-it-works/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/how-it-works/</guid><description>&lt;h1 id="how-it-works"&gt;How it works&lt;a class="anchor" href="#how-it-works"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;You don&amp;rsquo;t need to know any of this to use &lt;code&gt;helm-schema&lt;/code&gt; — but it explains &lt;em&gt;why&lt;/em&gt; the schema is more accurate than one derived from &lt;code&gt;values.yaml&lt;/code&gt;, and what to expect from the output.&lt;/p&gt;
&lt;p&gt;The short version: it reads your chart the way Helm does, follows each value to where it is actually used, and types it from what&amp;rsquo;s expected there.&lt;/p&gt;
&lt;h2 id="it-combines-three-signals"&gt;It combines three signals&lt;a class="anchor" href="#it-combines-three-signals"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For every value, &lt;code&gt;helm-schema&lt;/code&gt; looks at:&lt;/p&gt;</description></item><item><title>Continuous integration</title><link>https://romnn.github.io/helm-schema/docs/ci/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/ci/</guid><description>&lt;h1 id="continuous-integration"&gt;Continuous integration&lt;a class="anchor" href="#continuous-integration"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;There are two ways to use &lt;code&gt;helm-schema&lt;/code&gt; in CI: &lt;strong&gt;commit&lt;/strong&gt; the generated schema and verify it stays in sync, or &lt;strong&gt;generate&lt;/strong&gt; it fresh as part of packaging. Both rely on the output being &lt;a href="https://romnn.github.io/helm-schema/docs/reference/output/#determinism"&gt;deterministic&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="verify-a-committed-schema"&gt;Verify a committed schema&lt;a class="anchor" href="#verify-a-committed-schema"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The most common setup commits &lt;code&gt;values.schema.json&lt;/code&gt; next to &lt;code&gt;values.yaml&lt;/code&gt; (so Helm validates against it) and has CI fail if the committed file drifts from what the chart now produces.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;helm-schema&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="l"&gt;push, pull_request]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ubuntu-24.04&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install helm-schema&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;cargo install --locked helm-schema-cli&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Regenerate the schema&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;helm-schema ./charts/mychart --output ./charts/mychart/values.schema.json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Fail if it drifted&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;git diff --exit-code -- ./charts/mychart/values.schema.json&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If the schema is out of date, &lt;code&gt;git diff --exit-code&lt;/code&gt; fails and prints the diff. Contributors run the same &lt;code&gt;helm-schema … --output …&lt;/code&gt; command locally to update it.&lt;/p&gt;</description></item><item><title>FAQ</title><link>https://romnn.github.io/helm-schema/docs/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/faq/</guid><description>&lt;h1 id="faq"&gt;FAQ&lt;a class="anchor" href="#faq"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="is-it-production-ready"&gt;Is it production-ready?&lt;a class="anchor" href="#is-it-production-ready"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; is &lt;strong&gt;alpha&lt;/strong&gt;. It is useful and works for many charts, but Helm templating and YAML composition have many edge cases — whitespace trimming, dynamic keys, helper indirection, runtime-only behavior — and some charts will need &lt;a href="https://romnn.github.io/helm-schema/docs/guide/overrides/"&gt;manual overrides&lt;/a&gt; or will surface an occasional incorrect or missing inference. Treat the output as a strong starting point you can review and tighten, not an infallible contract.&lt;/p&gt;
&lt;h2 id="does-it-need-helm-or-a-cluster"&gt;Does it need Helm, or a cluster?&lt;a class="anchor" href="#does-it-need-helm-or-a-cluster"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;No to both. It parses templates itself (it does not shell out to &lt;code&gt;helm&lt;/code&gt;) and never contacts a Kubernetes API server. &amp;ldquo;Resource-aware&amp;rdquo; means it consults &lt;strong&gt;published JSON schemas&lt;/strong&gt; for the resources a chart renders, not a live cluster.&lt;/p&gt;</description></item></channel></rss>