<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reference on helm-schema</title><link>https://romnn.github.io/helm-schema/docs/reference/</link><description>Recent content in Reference on helm-schema</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://romnn.github.io/helm-schema/docs/reference/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>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>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>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></channel></rss>