<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>helm-schema</title><link>https://romnn.github.io/helm-schema/</link><description>Recent content on helm-schema</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://romnn.github.io/helm-schema/index.xml" rel="self" type="application/rss+xml"/><item><title>CLI reference</title><link>https://romnn.github.io/helm-schema/docs/reference/cli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/reference/cli/</guid><description>&lt;h1 id="cli-reference"&gt;CLI reference&lt;a class="anchor" href="#cli-reference"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; is a single command: one positional argument (the chart) plus flags. There are no subcommands. The generated schema goes to standard output unless &lt;code&gt;--output&lt;/code&gt; is given; diagnostics go to standard error.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;helm-schema [OPTIONS] &amp;lt;CHART_DIR&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Run &lt;code&gt;helm-schema --help&lt;/code&gt; for the authoritative, version-specific summary.&lt;/p&gt;
&lt;h2 id="argument"&gt;Argument&lt;a class="anchor" href="#argument"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Argument&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;&amp;lt;CHART_DIR&amp;gt;&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Chart directory or packaged chart archive (&lt;code&gt;.tgz&lt;/code&gt;/&lt;code&gt;.tar.gz&lt;/code&gt;) to analyze. Required.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="output"&gt;Output&lt;a class="anchor" href="#output"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Flag&lt;/th&gt;
					&lt;th&gt;Description&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;-o&lt;/code&gt;, &lt;code&gt;--output &amp;lt;FILE&amp;gt;&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Write the schema to a file; standard output is used when absent.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--compact&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Compact JSON instead of the default pretty-printed output.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--strip-descriptions&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Remove JSON Schema &lt;code&gt;description&lt;/code&gt; annotations. Schema-aware: a property literally named &lt;code&gt;description&lt;/code&gt; is kept.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--profile &amp;lt;full|lean&amp;gt;&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Select emitted validation detail. &lt;code&gt;full&lt;/code&gt; is the default. &lt;code&gt;lean&lt;/code&gt; omits document-level conditional validation to reduce Helm validator compilation cost and only widens acceptance.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--keep-refs&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Leave file/URL &lt;code&gt;$ref&lt;/code&gt; strings as-is. By default external refs are resolved into root-level &lt;code&gt;$defs&lt;/code&gt; so the output is self-contained. Conflicts with &lt;code&gt;--inline-refs&lt;/code&gt;.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--inline-refs&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Fully inline resolved file/URL &lt;code&gt;$ref&lt;/code&gt;s instead of writing &lt;code&gt;$defs&lt;/code&gt;.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;--no-minimize&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Keep repeated subtrees inline instead of interning them into root-level &lt;code&gt;$defs&lt;/code&gt;. Interning is on by default.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;See &lt;a href="https://romnn.github.io/helm-schema/docs/reference/output/"&gt;Output&lt;/a&gt; for what these produce.&lt;/p&gt;</description></item><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>Template analysis</title><link>https://romnn.github.io/helm-schema/docs/guide/template-analysis/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/template-analysis/</guid><description>&lt;h1 id="template-analysis"&gt;Template analysis&lt;a class="anchor" href="#template-analysis"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The core of &lt;code&gt;helm-schema&lt;/code&gt; is reading the chart&amp;rsquo;s templates. This page explains what it extracts and how the control flow around a value shapes the schema — which is what lets you predict the output.&lt;/p&gt;
&lt;h2 id="value-extraction"&gt;Value extraction&lt;a class="anchor" href="#value-extraction"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Every &lt;code&gt;.Values.*&lt;/code&gt; path that appears in render logic is collected — from manifests, from &lt;code&gt;_helpers.tpl&lt;/code&gt; helpers, and from YAML fragments loaded via &lt;code&gt;.Files.Get&lt;/code&gt; with a literal path. It reads the template&amp;rsquo;s real structure, so quoting, pipelines, nested calls, and whitespace trimming (&lt;code&gt;{{-&lt;/code&gt;/&lt;code&gt;-}}&lt;/code&gt;) are all handled correctly rather than approximated.&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>Output</title><link>https://romnn.github.io/helm-schema/docs/reference/output/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/reference/output/</guid><description>&lt;h1 id="output"&gt;Output&lt;a class="anchor" href="#output"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; emits a single &lt;strong&gt;JSON Schema, Draft-07&lt;/strong&gt;, rooted at the Helm values object and written to standard output (or &lt;code&gt;--output &amp;lt;FILE&amp;gt;&lt;/code&gt;). This page describes the shape of that output and the flags that control it.&lt;/p&gt;
&lt;h2 id="anatomy"&gt;Anatomy&lt;a class="anchor" href="#anatomy"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&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;&amp;#34;$schema&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;http://json-schema.org/draft-07/schema#&amp;#34;&lt;/span&gt;&lt;span class="p"&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;&amp;#34;$defs&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nt"&gt;&amp;#34;…&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;…&amp;#34;&lt;/span&gt; &lt;span class="p"&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;&amp;#34;additionalProperties&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&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;&amp;#34;properties&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nt"&gt;&amp;#34;…&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;…&amp;#34;&lt;/span&gt; &lt;span class="p"&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;&amp;#34;allOf&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;…&amp;#34;&lt;/span&gt; &lt;span class="p"&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;&amp;#34;type&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;object&amp;#34;&lt;/span&gt;&lt;span class="p"&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;&amp;#34;x-helm-schema-generated&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;$schema&lt;/code&gt;&lt;/strong&gt; — always Draft-07. This is the dialect Helm validates against.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;type: object&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;additionalProperties: false&lt;/code&gt;&lt;/strong&gt; — the root is the values object, and only keys the chart actually consumes are allowed. Unrecognized keys are rejected, which is what catches typos.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;properties&lt;/code&gt;&lt;/strong&gt; — one entry per value path the chart reads, typed from template use and resolved resource fields.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;allOf&lt;/code&gt;&lt;/strong&gt; — conditional structure produced from template control flow (&lt;code&gt;if&lt;/code&gt;/&lt;code&gt;then&lt;/code&gt;, guard-scoped constraints). See &lt;a href="https://romnn.github.io/helm-schema/docs/guide/template-analysis/"&gt;Template analysis&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;$defs&lt;/code&gt;&lt;/strong&gt; — interned subtrees shared by &lt;code&gt;$ref&lt;/code&gt; (see &lt;a href="#minimization"&gt;Minimization&lt;/a&gt;), plus a few reusable building blocks such as &lt;code&gt;helm-truthy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;x-helm-schema-generated: true&lt;/code&gt;&lt;/strong&gt; — a marker identifying the file as machine-generated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="recurring-building-blocks"&gt;Recurring building blocks&lt;a class="anchor" href="#recurring-building-blocks"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some &lt;code&gt;$defs&lt;/code&gt; entries appear across many charts:&lt;/p&gt;</description></item><item><title>Values &amp; defaults</title><link>https://romnn.github.io/helm-schema/docs/guide/values-and-defaults/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/values-and-defaults/</guid><description>&lt;h1 id="values--defaults"&gt;Values &amp;amp; defaults&lt;a class="anchor" href="#values--defaults"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Beyond where a value is &lt;em&gt;used&lt;/em&gt;, &lt;code&gt;helm-schema&lt;/code&gt; looks at how the chart &lt;em&gt;defaults&lt;/em&gt; it — both the composed &lt;code&gt;values.yaml&lt;/code&gt; document and &lt;code&gt;default&lt;/code&gt; expressions in templates.&lt;/p&gt;
&lt;h2 id="the-composed-values-document"&gt;The composed values document&lt;a class="anchor" href="#the-composed-values-document"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Before analysis, the tool builds one effective values document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the root &lt;code&gt;values.yaml&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;each subchart&amp;rsquo;s defaults merged under its dependency key,&lt;/li&gt;
&lt;li&gt;subchart &lt;code&gt;global&lt;/code&gt; merged into the top-level &lt;code&gt;global&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This composed document seeds the schema&amp;rsquo;s shape and supplies the default value for each path. Use &lt;code&gt;--no-subchart-values&lt;/code&gt; to omit vendored subchart defaults under &lt;code&gt;charts/&lt;/code&gt; (see &lt;a href="https://romnn.github.io/helm-schema/docs/guide/subcharts/"&gt;Subcharts&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Diagnostics</title><link>https://romnn.github.io/helm-schema/docs/reference/diagnostics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/reference/diagnostics/</guid><description>&lt;h1 id="diagnostics"&gt;Diagnostics&lt;a class="anchor" href="#diagnostics"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Anything &lt;code&gt;helm-schema&lt;/code&gt; can&amp;rsquo;t resolve is reported as a &lt;strong&gt;diagnostic&lt;/strong&gt; on standard error, never silently guessed. Diagnostics never appear in the schema (which goes to stdout), so they don&amp;rsquo;t interfere with piping the output to a file.&lt;/p&gt;
&lt;h2 id="format"&gt;Format&lt;a class="anchor" href="#format"&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;helm-schema ./mychart --diag-format text &lt;span class="c1"&gt;# default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;helm-schema ./mychart --diag-format json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;text&lt;/code&gt;&lt;/strong&gt; (default): human-readable lines prefixed with &lt;code&gt;warning:&lt;/code&gt; or &lt;code&gt;info:&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;json&lt;/code&gt;&lt;/strong&gt;: one JSON object per line. Each is a &lt;code&gt;Diagnostic&lt;/code&gt; — a discriminated union tagged on a &lt;code&gt;&amp;quot;type&amp;quot;&lt;/code&gt; field. After a successful CLI parse, &lt;em&gt;every&lt;/em&gt; stderr line is such an object.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CLI &lt;strong&gt;parse&lt;/strong&gt; errors are not part of the JSON contract: clap writes a plain-text usage error before the runtime starts. JSON consumers distinguish the two by exit code — a non-zero exit with no JSON line emitted means a parse error.&lt;/p&gt;</description></item><item><title>Kubernetes schemas</title><link>https://romnn.github.io/helm-schema/docs/guide/kubernetes-schemas/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/kubernetes-schemas/</guid><description>&lt;h1 id="kubernetes-schemas"&gt;Kubernetes schemas&lt;a class="anchor" href="#kubernetes-schemas"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;When a value flows into a built-in Kubernetes resource field, &lt;code&gt;helm-schema&lt;/code&gt; types it from the upstream Kubernetes JSON schema for that resource. This is what turns &lt;code&gt;spec.replicas&lt;/code&gt; into an &lt;code&gt;int32&lt;/code&gt; with the API&amp;rsquo;s own description, or a &lt;code&gt;resources&lt;/code&gt; block into the full &lt;code&gt;ResourceRequirements&lt;/code&gt; shape.&lt;/p&gt;
&lt;p&gt;Schemas are fetched on demand from the upstream catalog and cached locally. The upstream source is authoritative; the &lt;a href="https://romnn.github.io/helm-schema/docs/reference/caching/"&gt;cache&lt;/a&gt; only makes repeat lookups fast.&lt;/p&gt;
&lt;h2 id="choosing-the-version"&gt;Choosing the version&lt;a class="anchor" href="#choosing-the-version"&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;helm-schema ./mychart --k8s-version v1.34.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--k8s-version&lt;/code&gt; selects the Kubernetes minor version whose schemas are consulted. The default is &lt;strong&gt;&lt;code&gt;v1.35.0&lt;/code&gt;&lt;/strong&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>Caching</title><link>https://romnn.github.io/helm-schema/docs/reference/caching/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/reference/caching/</guid><description>&lt;h1 id="caching"&gt;Caching&lt;a class="anchor" href="#caching"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; caches the Kubernetes and CRD schemas it fetches so repeat runs are fast and can run &lt;a href="https://romnn.github.io/helm-schema/docs/guide/kubernetes-schemas/#working-offline"&gt;offline&lt;/a&gt;. The cache is purely a speed optimization — &lt;strong&gt;never&lt;/strong&gt; a source of truth.&lt;/p&gt;
&lt;blockquote class='book-hint note'&gt;
&lt;p&gt;The upstream schema source is always authoritative; the cache is fetch-on-miss. A run against a cold cache and a run against a warm cache produce the &lt;strong&gt;same schema&lt;/strong&gt;. If a code path could answer differently depending on what happens to be cached, that is a bug — the tool is designed so it can&amp;rsquo;t.&lt;/p&gt;</description></item><item><title>CRD schemas</title><link>https://romnn.github.io/helm-schema/docs/guide/crd-schemas/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/crd-schemas/</guid><description>&lt;h1 id="crd-schemas"&gt;CRD schemas&lt;a class="anchor" href="#crd-schemas"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Charts that deploy custom resources — a &lt;code&gt;ServiceMonitor&lt;/code&gt;, a &lt;code&gt;Certificate&lt;/code&gt;, an operator&amp;rsquo;s CRD — need schemas that aren&amp;rsquo;t part of the built-in Kubernetes API. &lt;code&gt;helm-schema&lt;/code&gt; resolves those against a &lt;strong&gt;CRD catalog&lt;/strong&gt;, using the same lookup order as built-in resources, with your local overrides at the top.&lt;/p&gt;
&lt;p&gt;The lookup order for any grouped resource is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;local overrides&lt;/strong&gt; (&lt;code&gt;--crd-override-dir&lt;/code&gt;) — authoritative,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;the CRD catalog&lt;/strong&gt; (fetched and cached, per version),&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;upstream Kubernetes JSON schemas&lt;/strong&gt; (for built-in kinds).&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="version-lookup-strict-vs-loose"&gt;Version lookup: strict vs loose&lt;a class="anchor" href="#version-lookup-strict-vs-loose"&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;helm-schema ./mychart --crd-version-lookup strict &lt;span class="c1"&gt;# default&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;helm-schema ./mychart --crd-version-lookup loose&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;strict&lt;/code&gt;&lt;/strong&gt; (default) consults only the exact &lt;code&gt;(group, kind, version)&lt;/code&gt; the chart pinned. A CRD version is never substituted — pinning &lt;code&gt;v1&lt;/code&gt; and getting a &lt;code&gt;v1alpha1&lt;/code&gt; schema would be wrong.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;loose&lt;/code&gt;&lt;/strong&gt; resolves identically (still no substitution), but additionally scans the local cache for &lt;em&gt;other&lt;/em&gt; versions of the same &lt;code&gt;(group, kind)&lt;/code&gt;. When the requested version is missing but others are present, it emits a &lt;a href="https://romnn.github.io/helm-schema/docs/reference/diagnostics/"&gt;&lt;code&gt;CrdVersionAvailableAtOtherVersions&lt;/code&gt;&lt;/a&gt; hint — informational only.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;--strict-crd-version&lt;/code&gt; is a short alias for &lt;code&gt;--crd-version-lookup=strict&lt;/code&gt;, kept for symmetry with the other strict flags.&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>Subcharts &amp; dependencies</title><link>https://romnn.github.io/helm-schema/docs/guide/subcharts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/subcharts/</guid><description>&lt;h1 id="subcharts--dependencies"&gt;Subcharts &amp;amp; dependencies&lt;a class="anchor" href="#subcharts--dependencies"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;helm-schema&lt;/code&gt; analyzes a chart together with its vendored dependencies, so the schema covers values consumed by subcharts too.&lt;/p&gt;
&lt;h2 id="discovery"&gt;Discovery&lt;a class="anchor" href="#discovery"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Chart discovery reads &lt;code&gt;Chart.yaml&lt;/code&gt; (and &lt;code&gt;Chart.template.yaml&lt;/code&gt;) and walks dependencies under &lt;code&gt;charts/&lt;/code&gt; — both unpacked directories and packaged &lt;code&gt;.tgz&lt;/code&gt;/&lt;code&gt;.tar.gz&lt;/code&gt; archives. Each dependency&amp;rsquo;s templates are analyzed, and the values it consumes appear in the schema under its dependency key.&lt;/p&gt;
&lt;h2 id="composed-values-and-global"&gt;Composed values and &lt;code&gt;global&lt;/code&gt;&lt;a class="anchor" href="#composed-values-and-global"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The effective values document merges:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the parent chart&amp;rsquo;s &lt;code&gt;values.yaml&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;each subchart&amp;rsquo;s defaults, nested under its dependency key,&lt;/li&gt;
&lt;li&gt;each subchart&amp;rsquo;s &lt;code&gt;global&lt;/code&gt; values, merged into the top-level &lt;code&gt;global&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That mirrors how Helm itself composes values, so a value a subchart reads from &lt;code&gt;.Values.global.*&lt;/code&gt; and one the parent sets under &lt;code&gt;subchartName.*&lt;/code&gt; both land where the schema expects them.&lt;/p&gt;</description></item><item><title>Schema overrides</title><link>https://romnn.github.io/helm-schema/docs/guide/overrides/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://romnn.github.io/helm-schema/docs/guide/overrides/</guid><description>&lt;h1 id="schema-overrides"&gt;Schema overrides&lt;a class="anchor" href="#schema-overrides"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Static analysis can&amp;rsquo;t recover everything — a value assembled through a dynamically-computed key, a field an outer pipeline injects at render time, or a type the templates simply never pin down. For those residual cases, post-process the generated schema with one or more &lt;strong&gt;override schemas&lt;/strong&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 class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --override-schema ../schemas/injected-keys.override.json &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --override-schema ./schema-override.json &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --output values.schema.json&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--override-schema&lt;/code&gt; is &lt;strong&gt;repeatable&lt;/strong&gt;. Files are applied in the order given, each merged on top of the previous result. A common split is a shared cross-chart override (for example, top-level keys an outer templating pipeline injects and &lt;code&gt;helm-schema&lt;/code&gt; can&amp;rsquo;t see in &lt;code&gt;values.yaml&lt;/code&gt;) followed by a chart-specific override.&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>