<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Moep90</title>
    <description>The latest articles on DEV Community by Moep90 (@moep90).</description>
    <link>https://dev.to/moep90</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4190888%2Fe7f3930f-32f8-4bbe-8c61-0aef288e7cb5.png</url>
      <title>DEV Community: Moep90</title>
      <link>https://dev.to/moep90</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moep90"/>
    <language>en</language>
    <item>
      <title>Kapitan generators as supply-chain artifacts</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Sun, 18 Oct 2026 04:33:17 +0000</pubDate>
      <link>https://dev.to/kadet-hub/kapitan-generators-as-supply-chain-artifacts-4996</link>
      <guid>https://dev.to/kadet-hub/kapitan-generators-as-supply-chain-artifacts-4996</guid>
      <description>&lt;p&gt;Kapitan's kadet generators are Python packages that turn an inventory into&lt;br&gt;
Kubernetes manifests, Terraform JSON or anything else. They are also code&lt;br&gt;
that runs on your machine and in CI with access to your inventory and&lt;br&gt;
secrets. In most projects they get copied between repositories and run&lt;br&gt;
without review.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kadet-hub.org/" rel="noopener noreferrer"&gt;kadet-hub&lt;/a&gt; is a community catalog that treats them&lt;br&gt;
like any other dependency you would want to pin and verify. It lists 35&lt;br&gt;
generators today, among them Argo CD, cert-manager, Cilium, CloudNativePG,&lt;br&gt;
Crossplane, External Secrets, Flux, KEDA, Kyverno, the Prometheus operator,&lt;br&gt;
Velero and Terraform generators for AWS, AzureRM, Google Cloud and Open&lt;br&gt;
Telekom Cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a version goes through
&lt;/h2&gt;

&lt;p&gt;Before a version is listed, a gate runs on the pull request that registers&lt;br&gt;
it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;secret, malware and code scans of the source;&lt;/li&gt;
&lt;li&gt;a compile of the generator's fixture targets in a gVisor sandbox without
network, on every inventory backend it declares, once more with
Kapitan's compile cache, which must produce identical output;&lt;/li&gt;
&lt;li&gt;validation of the rendered output against the JSON Schemas the
generator ships;&lt;/li&gt;
&lt;li&gt;a server-side dry run of every built-in document, and of every custom
resource whose CRD the generator ships, against a throwaway
kube-apiserver.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A maintainer reviews the result. The version is then published to&lt;br&gt;
&lt;code&gt;ghcr.io/kadet-hub/&amp;lt;name&amp;gt;&lt;/code&gt; as an OCI artifact with a Sigstore signature,&lt;br&gt;
an SBOM and a transparency log entry, and you pin it by digest in your&lt;br&gt;
inventory.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the gate caught
&lt;/h2&gt;

&lt;p&gt;The dry runs were added after schema validation alone let real bugs&lt;br&gt;
through. Some examples from the generators now listed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;probes rendered as empty objects (&lt;code&gt;startupProbe: {}&lt;/code&gt;), which the API
server rejects and a JSON Schema accepts;&lt;/li&gt;
&lt;li&gt;a Flux HelmRelease with both &lt;code&gt;chart&lt;/code&gt; and &lt;code&gt;chartRef&lt;/code&gt;, which violates a
CEL rule in the CRD that no JSON Schema check evaluates;&lt;/li&gt;
&lt;li&gt;a generator whose submodule cached the inventory of the first target it
was imported for, so the output depended on the order in which Kapitan
compiled targets. The cache comparison showed it as a namespace that
differed between two runs of the same commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CRD dry run has its own write-up:&lt;br&gt;
&lt;a href="https://kadet-hub.org/guides/checking-custom-resources-against-crds/" rel="noopener noreferrer"&gt;Checking custom resources against their CRDs&lt;/a&gt;.&lt;br&gt;
It also covers operators that create their CRDs at runtime and publish&lt;br&gt;
no YAML, such as KubeVirt and CDI, which leaves nothing to validate&lt;br&gt;
against offline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consuming and writing generators
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/kadet-hub/registry/blob/main/docs/consumers.md" rel="noopener noreferrer"&gt;consumer guide&lt;/a&gt;&lt;br&gt;
shows how to pull a generator with Kapitan's &lt;code&gt;oci&lt;/code&gt; dependency type and&lt;br&gt;
verify it. &lt;code&gt;kapitan compile --fetch&lt;/code&gt; checks neither signatures nor&lt;br&gt;
digests, so a reusable GitHub workflow does the verification and compiles&lt;br&gt;
your inventory in the same sandbox.&lt;/p&gt;

&lt;p&gt;To write one, start from the&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/generator-template" rel="noopener noreferrer"&gt;generator template&lt;/a&gt;. Its&lt;br&gt;
&lt;code&gt;./check&lt;/code&gt; script runs the gate's scans and the sandboxed compile locally,&lt;br&gt;
and &lt;a href="https://kadet-hub.org/guides/writing-a-kapitan-generator/" rel="noopener noreferrer"&gt;Writing a Kapitan generator&lt;/a&gt;&lt;br&gt;
documents the contract Kapitan gives a generator.&lt;/p&gt;

&lt;p&gt;kadet-hub is a community project and is not affiliated with or endorsed by&lt;br&gt;
the Kapitan project or kapicorp. Generator requests and feedback are&lt;br&gt;
welcome as &lt;a href="https://github.com/kadet-hub/registry/issues" rel="noopener noreferrer"&gt;issues&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/kapitan-generators-as-supply-chain-artifacts/" rel="noopener noreferrer"&gt;kadet-hub.org&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>kapitan</category>
      <category>gitops</category>
    </item>
  </channel>
</rss>
