<?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>Matrix Synapse federation: well-known delegation and TLS on 443</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Sat, 28 Nov 2026 14:28:25 +0000</pubDate>
      <link>https://dev.to/kadet-hub/matrix-synapse-federation-well-known-delegation-and-tls-on-443-15ha</link>
      <guid>https://dev.to/kadet-hub/matrix-synapse-federation-well-known-delegation-and-tls-on-443-15ha</guid>
      <description>&lt;p&gt;A Matrix homeserver's server name is the domain in the IDs of its users&lt;br&gt;
and room aliases, such as &lt;code&gt;example.com&lt;/code&gt; in &lt;code&gt;@admin:example.com&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;#room:example.com&lt;/code&gt;. Federation lets the users of one homeserver take&lt;br&gt;
part in rooms of another, so the servers have to reach each other. By&lt;br&gt;
default, other servers look for a homeserver at its server name&lt;br&gt;
(&lt;a href="https://element-hq.github.io/synapse/v1.164/federate.html" rel="noopener noreferrer"&gt;Synapse's federation docs&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;This post runs two Synapse homeservers, &lt;code&gt;a.example.test&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;b.example.test&lt;/code&gt;, in one &lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster. Both come from&lt;br&gt;
the &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt; &lt;a href="https://kadet-hub.org/recipes/matrix-synapse/" rel="noopener noreferrer"&gt;matrix-synapse&lt;/a&gt;&lt;br&gt;
that kadet-hub publishes for &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt;, with its&lt;br&gt;
option &lt;code&gt;federation&lt;/code&gt;. The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/matrix-federation" rel="noopener noreferrer"&gt;matrix-federation&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script deploys it to a new kind&lt;br&gt;
cluster on every change and once a week. It passes only when the admin&lt;br&gt;
of &lt;code&gt;a.example.test&lt;/code&gt; joins a room of &lt;code&gt;b.example.test&lt;/code&gt; and both admins read&lt;br&gt;
each other's message. It also requires a join to fail with 404 while&lt;br&gt;
&lt;code&gt;b.example.test&lt;/code&gt; runs without the option, and with 502 while&lt;br&gt;
&lt;code&gt;a.example.test&lt;/code&gt; lacks one setting that only this cluster needs.&lt;/p&gt;
&lt;h2&gt;
  
  
  What a homeserver needs to federate
&lt;/h2&gt;

&lt;p&gt;By default, other servers reach a homeserver at its server name on port&lt;br&gt;
8448, with TLS. Delegation sends them elsewhere. A JSON file at&lt;br&gt;
&lt;code&gt;https://&amp;lt;server_name&amp;gt;/.well-known/matrix/server&lt;/code&gt;, served on port 443,&lt;br&gt;
names the host and port for federation traffic. When&lt;br&gt;
&lt;code&gt;https://&amp;lt;server_name&amp;gt;/&lt;/code&gt; on port 443 already reaches Synapse, Synapse can&lt;br&gt;
serve the file itself with&lt;br&gt;
&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#serve_server_wellknown" rel="noopener noreferrer"&gt;&lt;code&gt;serve_server_wellknown: true&lt;/code&gt;&lt;/a&gt;,&lt;br&gt;
and the file then sends other servers to port 443 of the server name&lt;br&gt;
(&lt;a href="https://element-hq.github.io/synapse/v1.164/delegate.html" rel="noopener noreferrer"&gt;Synapse's delegation docs&lt;/a&gt;).&lt;br&gt;
Asked from the pod of &lt;code&gt;a.example.test&lt;/code&gt;, &lt;code&gt;b.example.test&lt;/code&gt; answers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"m.server"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"b.example.test:443"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server name therefore has to resolve to an address where port 443&lt;br&gt;
answers TLS with a certificate for the name, and both &lt;code&gt;/_matrix&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;/.well-known/matrix/server&lt;/code&gt; have to reach Synapse's listener behind it.&lt;br&gt;
Synapse's federation client speaks TLS only. It verifies the certificate&lt;br&gt;
of each server it calls, as&lt;br&gt;
&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#federation_verify_certificates" rel="noopener noreferrer"&gt;&lt;code&gt;federation_verify_certificates&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
defaults to true. It also refuses to call an address in a private range&lt;br&gt;
such as &lt;code&gt;10.0.0.0/8&lt;/code&gt;, which its default&lt;br&gt;
&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#ip_range_blacklist" rel="noopener noreferrer"&gt;&lt;code&gt;ip_range_blacklist&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
lists.&lt;/p&gt;

&lt;p&gt;Two servers in one cluster meet these needs differently from a server on&lt;br&gt;
the internet:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Need&lt;/th&gt;
&lt;th&gt;Here, in one kind cluster&lt;/th&gt;
&lt;th&gt;A server on the internet&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;The name resolves&lt;/td&gt;
&lt;td&gt;CoreDNS rewrites it to the Service &lt;code&gt;matrix-tls&lt;/code&gt; of the server's namespace&lt;/td&gt;
&lt;td&gt;a public DNS record&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TLS on port 443&lt;/td&gt;
&lt;td&gt;nginx in the Deployment &lt;code&gt;matrix-tls&lt;/code&gt;, with a certificate that &lt;code&gt;check&lt;/code&gt; signs with its own CA&lt;/td&gt;
&lt;td&gt;the ingress, with a certificate of a public CA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The certificate is trusted&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;federation_custom_ca_list&lt;/code&gt; names that CA&lt;/td&gt;
&lt;td&gt;the CAs of the operating environment, Synapse's default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The address may be called&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ip_range_whitelist: [10.96.0.0/12]&lt;/code&gt;, kind's Service addresses&lt;/td&gt;
&lt;td&gt;a public address, outside &lt;code&gt;ip_range_blacklist&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#federation_custom_ca_list" rel="noopener noreferrer"&gt;&lt;code&gt;federation_custom_ca_list&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
replaces the CAs of the operating environment, so a server with it&lt;br&gt;
trusts only the listed CA for federation. Synapse's docs advise it for a&lt;br&gt;
private network of homeservers only.&lt;/p&gt;
&lt;h2&gt;
  
  
  What each recipe brings
&lt;/h2&gt;

&lt;p&gt;A recipe is a directory of Kapitan classes, published as a signed OCI&lt;br&gt;
artifact.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/matrix-synapse/" rel="noopener noreferrer"&gt;matrix-synapse&lt;/a&gt; 1.0.0 runs Synapse 1.164.2
from element-hq's image as the StatefulSet &lt;code&gt;matrix-synapse&lt;/code&gt;, with a
claim for the signing key and the media. Synapse reads its settings
from the YAML files of the ConfigMap &lt;code&gt;matrix-synapse&lt;/code&gt; at &lt;code&gt;/config&lt;/code&gt;. The
Job &lt;code&gt;matrix-synapse-admin&lt;/code&gt; registers the first admin. Federation is off
unless the option is on. The recipe renders with the
&lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator 1.14.0.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/postgresql/" rel="noopener noreferrer"&gt;postgresql&lt;/a&gt; 1.1.1, which matrix-synapse
includes, renders the CloudNativePG &lt;code&gt;Cluster&lt;/code&gt; &lt;code&gt;postgresql-cluster&lt;/code&gt;
with PostgreSQL 18.6 for Synapse's database, with the
&lt;a href="https://kadet-hub.org/generators/cloudnative-pg/" rel="noopener noreferrer"&gt;cloudnative-pg&lt;/a&gt; generator 1.1.0.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/cnpg/" rel="noopener noreferrer"&gt;cnpg&lt;/a&gt; 1.0.3 is the CloudNativePG operator 1.30.1, here
with its CRDs, in the target &lt;code&gt;cnpg&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The fetch inventory
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fetch/targets/recipes.yml&lt;/code&gt; pins the two recipes the targets include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/cnpg:1.0.3@sha256:f38aafdaf2a7ff8fe9a3356e435d05d23f0e7584299f7b326d7f25f2500a2343&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/cnpg&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/matrix-synapse:1.0.0@sha256:53c575c0f9d62a0b9506c2aa98fb63f35f1f6a00362c4c6a6eb2abdf7e85d885&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/matrix-synapse&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; adds postgresql 1.1.1 at the digest that the index record of&lt;br&gt;
matrix-synapse 1.0.0 lists under &lt;code&gt;includes&lt;/code&gt;. It verifies the signed&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#index" rel="noopener noreferrer"&gt;index&lt;/a&gt;, the three recipes and the two generators they&lt;br&gt;
pin, and pulls them all by &lt;a href="https://kadet-hub.org/glossary/#digest" rel="noopener noreferrer"&gt;digest&lt;/a&gt;, as the&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/open-webui-searxng-kubernetes/#verify-then-pull-by-digest" rel="noopener noreferrer"&gt;Open WebUI and SearXNG post&lt;/a&gt;&lt;br&gt;
shows step by step.&lt;/p&gt;
&lt;h2&gt;
  
  
  Two targets and one class
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;inventory/targets/synapse-a.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.matrix-synapse&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.matrix-synapse.federation&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;federated&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;synapse-a&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;synapse-a&lt;/span&gt;
  &lt;span class="na"&gt;federated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The option is the class &lt;code&gt;recipes.matrix-synapse.federation&lt;/code&gt;, listed after&lt;br&gt;
the recipe. &lt;code&gt;synapse-b.yml&lt;/code&gt; is the same with &lt;code&gt;b&lt;/code&gt; in place of &lt;code&gt;a&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The recipe keeps its federation settings in the file &lt;code&gt;federation.yaml&lt;/code&gt;&lt;br&gt;
of the ConfigMap. Without the option, the listener serves the client API&lt;br&gt;
only, and &lt;code&gt;federation_domain_whitelist: []&lt;/code&gt; denies federation with every&lt;br&gt;
server, which Synapse's docs recommend for turning federation off. The&lt;br&gt;
option replaces the file. In the compiled ConfigMap of &lt;code&gt;synapse-b&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;federation.yaml&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="na"&gt;listeners&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8008&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
      &lt;span class="na"&gt;x_forwarded&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
      &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;names&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;client&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;federation&lt;/span&gt;
  &lt;span class="na"&gt;serve_server_wellknown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The listener on port 8008 now serves the federation API next to the&lt;br&gt;
client API, and Synapse serves the well-known file.&lt;/p&gt;

&lt;p&gt;The class &lt;code&gt;inventory/classes/federated.yml&lt;/code&gt; holds what both servers&lt;br&gt;
share. &lt;code&gt;federated.name&lt;/code&gt; sets the server name and the paths of the&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;refs&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matrix-synapse&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;server_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${federated.name}.example.test&lt;/span&gt;
      &lt;span class="na"&gt;registration_shared_secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:federated/${federated.name}/registration-shared-secret||random:str:32}&lt;/span&gt;
      &lt;span class="na"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
        &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:federated/${federated.name}/admin-password||random:str:24}&lt;/span&gt;
    &lt;span class="c1"&gt;# One node: further instances on it would share its disk.
&lt;/span&gt;    &lt;span class="na"&gt;postgresql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;instances&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matrix-synapse&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;config_maps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;kind.yaml&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
                &lt;span class="na"&gt;federation_custom_ca_list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/secrets/ca.crt&lt;/span&gt;
                &lt;span class="na"&gt;ip_range_whitelist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;10.96.0.0/12&lt;/span&gt;
      &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;string_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;ca.crt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:federated/ca.crt}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;kind.yaml&lt;/code&gt; is a third file in the ConfigMap, with the two settings from&lt;br&gt;
the table that only a cluster with both servers needs. The CA goes into&lt;br&gt;
the recipe's Secret &lt;code&gt;matrix-synapse&lt;/code&gt;, which the StatefulSet mounts at&lt;br&gt;
&lt;code&gt;/secrets&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The same class adds the component &lt;code&gt;matrix-tls&lt;/code&gt;, nginx from the image&lt;br&gt;
&lt;code&gt;docker.io/nginxinc/nginx-unprivileged:1.31.7-alpine&lt;/code&gt;, pinned by digest.&lt;br&gt;
Its Service maps port 443 to the container's 8443, and its configuration&lt;br&gt;
passes every request to Synapse:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;listen&lt;/span&gt; &lt;span class="mi"&gt;8443&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;ssl_certificate&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tls&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;crt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;ssl_certificate_key&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tls&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;tls&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;proxy_pass&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//matrix-synapse:8008;&lt;/span&gt;
    &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="nc"&gt;Host&lt;/span&gt; $&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Forwarded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;For&lt;/span&gt; $&lt;span class="n"&gt;remote_addr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="no"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Forwarded&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Proto&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The certificate and the key come from the refs &lt;code&gt;federated/a.crt&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;federated/a.key&lt;/code&gt;, or the pair of &lt;code&gt;b&lt;/code&gt;. This component is what a real&lt;br&gt;
deployment replaces with its ingress.&lt;/p&gt;
&lt;h2&gt;
  
  
  Certificates and refs
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; creates the CA and one certificate per server, valid for two&lt;br&gt;
days, and writes them as refs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 2 \
  -subj &lt;span class="s1"&gt;'/CN=matrix-federation example CA'&lt;/span&gt; -addext &lt;span class="nv"&gt;basicConstraints&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;critical,CA:TRUE \
  -addext &lt;span class="nv"&gt;keyUsage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;critical,keyCertSign,cRLSign -keyout ca.key -out ca.crt
openssl req -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -subj /CN=a.example.test \
  -addext &lt;span class="nv"&gt;subjectAltName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;DNS:a.example.test -keyout a.key -out a.csr
openssl x509 -req -in a.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 2 \
  -copy_extensions copy -out a.crt
kapitan refs --write base64:federated/a.crt -f a.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ec_paramgen_curve:prime256v1&lt;/code&gt; is OpenSSL's name for the curve P-256.&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; runs the same for &lt;code&gt;b&lt;/code&gt; and writes &lt;code&gt;ca.crt&lt;/code&gt;, &lt;code&gt;a.key&lt;/code&gt;, &lt;code&gt;b.crt&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;b.key&lt;/code&gt; to refs of the same form. A repository writes these refs once,&lt;br&gt;
with the backend it keeps refs in. The shared secret and the admin&lt;br&gt;
passwords get random values in the first compile, and a second compile&lt;br&gt;
with &lt;code&gt;--reveal&lt;/code&gt; writes all refs into the Secrets.&lt;/p&gt;
&lt;h2&gt;
  
  
  Compile and deploy
&lt;/h2&gt;

&lt;p&gt;The recipes are written for the omegaconf inventory backend, which&lt;br&gt;
&lt;code&gt;.kapitan&lt;/code&gt; selects. The two compiles write 42 files for the targets&lt;br&gt;
&lt;code&gt;cnpg&lt;/code&gt;, &lt;code&gt;synapse-a&lt;/code&gt; and &lt;code&gt;synapse-b&lt;/code&gt;. Chainsaw then applies them to the&lt;br&gt;
new cluster, each step waiting for what the next one needs.&lt;/p&gt;

&lt;p&gt;First CoreDNS gets one rewrite rule per server and restarts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rewrite name exact a.example.test matrix-tls.synapse-a.svc.cluster.local answer auto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A pod that looks up &lt;code&gt;a.example.test&lt;/code&gt; then gets the address of the&lt;br&gt;
Service &lt;code&gt;matrix-tls&lt;/code&gt; in &lt;code&gt;synapse-a&lt;/code&gt;, as a public DNS record would give&lt;br&gt;
the address of the ingress.&lt;/p&gt;

&lt;p&gt;Then come the namespaces, at Pod Security &lt;code&gt;restricted&lt;/code&gt;, and the&lt;br&gt;
operator. Synapse, its PostgreSQL, the proxy and the operator all meet&lt;br&gt;
that level. For each server, the CloudNativePG &lt;code&gt;Cluster&lt;/code&gt; goes first,&lt;br&gt;
because Synapse exits while PostgreSQL refuses connections. The rest&lt;br&gt;
follows, and the step ends when the StatefulSet &lt;code&gt;matrix-synapse&lt;/code&gt; and the&lt;br&gt;
Deployment &lt;code&gt;matrix-tls&lt;/code&gt; are ready and the Job &lt;code&gt;matrix-synapse-admin&lt;/code&gt; is&lt;br&gt;
complete.&lt;/p&gt;

&lt;p&gt;To run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;matrix-federation/check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It needs &lt;code&gt;gh&lt;/code&gt; (logged in), &lt;code&gt;jq&lt;/code&gt;, &lt;code&gt;oras&lt;/code&gt;, &lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;kind&lt;/code&gt;, &lt;code&gt;kubectl&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;chainsaw&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt;, &lt;code&gt;openssl&lt;/code&gt; and &lt;code&gt;docker&lt;/code&gt;. With &lt;code&gt;KEEP=1&lt;/code&gt;, the cluster&lt;br&gt;
stays after the check.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the check proves
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;tests/federate.sh&lt;/code&gt; reaches the client API of each server through&lt;br&gt;
&lt;code&gt;kubectl port-forward&lt;/code&gt; to its Service &lt;code&gt;matrix-synapse&lt;/code&gt; and logs in both&lt;br&gt;
admins. The admin of &lt;code&gt;b.example.test&lt;/code&gt; creates a public room with the&lt;br&gt;
alias &lt;code&gt;#fed:b.example.test&lt;/code&gt; and sends a message. The admin of&lt;br&gt;
&lt;code&gt;a.example.test&lt;/code&gt; then joins the room by its alias, through the client&lt;br&gt;
API of &lt;code&gt;a.example.test&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -H &lt;span class="s2"&gt;"Authorization: Bearer $token"&lt;/span&gt; -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; --data &lt;span class="s1"&gt;'{}'&lt;/span&gt; \
  &lt;span class="s2"&gt;"$a/_matrix/client/v3/join/%23fed%3Ab.example.test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;$a&lt;/code&gt; stands for the local end of the port-forward to &lt;code&gt;a.example.test&lt;/code&gt;.&lt;br&gt;
The join has to return 200 with the room's ID. The admin of&lt;br&gt;
&lt;code&gt;a.example.test&lt;/code&gt; then has to find the message of &lt;code&gt;b.example.test&lt;/code&gt; in the&lt;br&gt;
room's history, and the admin of &lt;code&gt;b.example.test&lt;/code&gt; the reply. Each admin&lt;br&gt;
reads through the client API of their own server, so each message&lt;br&gt;
crossed from one server to the other.&lt;/p&gt;

&lt;p&gt;The CI log has no Synapse logs. In a local run of the same &lt;code&gt;check&lt;/code&gt;,&lt;br&gt;
Synapse on &lt;code&gt;a.example.test&lt;/code&gt; logged the join like this, shortened to the&lt;br&gt;
messages, with the room and event IDs cut:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fetching https://b.example.test/.well-known/matrix/server
Response from .well-known: {'m.server': 'b.example.test:443'}
{GET-O-1} [b.example.test] Completed request: 200 OK in 4.53 secs, got 87 bytes - GET matrix-federation://b.example.test/_matrix/federation/v1/query/directory?room_alias=%23fed%3Ab.example.test
{GET-O-2} [b.example.test] Completed request: 200 OK in 0.02 secs, got 428 bytes - GET matrix-federation://b.example.test/_matrix/federation/v1/make_join/...
{PUT-O-3} [b.example.test] Completed request: 200 OK in 0.08 secs, got 5089 bytes - PUT matrix-federation://b.example.test/_matrix/federation/v2/send_join/...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It fetched the well-known file, looked up the alias through the&lt;br&gt;
federation API of &lt;code&gt;b.example.test&lt;/code&gt; and joined the room with &lt;code&gt;make_join&lt;/code&gt;&lt;br&gt;
and &lt;code&gt;send_join&lt;/code&gt;. The reply went out later as a &lt;code&gt;PUT&lt;/code&gt; to&lt;br&gt;
&lt;code&gt;/_matrix/federation/v1/send/&lt;/code&gt;, which &lt;code&gt;b.example.test&lt;/code&gt; answered with&lt;br&gt;
200.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; compiles each of the two failing cases from a copy of the&lt;br&gt;
inventory with one change, and takes only Synapse's ConfigMap from it.&lt;br&gt;
&lt;code&gt;federate.sh&lt;/code&gt; applies that ConfigMap and replaces the pod&lt;br&gt;
&lt;code&gt;matrix-synapse-0&lt;/code&gt;, because Synapse reads its configuration only when it&lt;br&gt;
starts.&lt;/p&gt;
&lt;h3&gt;
  
  
  Without the option on b.example.test
&lt;/h3&gt;

&lt;p&gt;The copy leaves &lt;code&gt;recipes.matrix-synapse.federation&lt;/code&gt; out of&lt;br&gt;
&lt;code&gt;synapse-b.yml&lt;/code&gt;. &lt;code&gt;check&lt;/code&gt; requires that its ConfigMap lack the resource&lt;br&gt;
&lt;code&gt;federation&lt;/code&gt; and carry &lt;code&gt;federation_domain_whitelist: []&lt;/code&gt; again. A join&lt;br&gt;
of the new alias &lt;code&gt;#fed-off:b.example.test&lt;/code&gt; then has to return 404.&lt;/p&gt;

&lt;p&gt;It returns 404 with &lt;code&gt;M_NOT_FOUND&lt;/code&gt;. In the local run, the listener of&lt;br&gt;
&lt;code&gt;b.example.test&lt;/code&gt; answered the alias lookup with&lt;br&gt;
&lt;code&gt;404 - Unrecognized request&lt;/code&gt;, and &lt;code&gt;a.example.test&lt;/code&gt; passed the 404 on to&lt;br&gt;
its client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error retrieving alias #fed-off:b.example.test -&amp;gt; 404 Not Found
SynapseError: 404 - Room alias #fed-off:b.example.test not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;a.example.test&lt;/code&gt; still called port 443 here, because it had fetched the&lt;br&gt;
well-known file of &lt;code&gt;b.example.test&lt;/code&gt; for the first join. Synapse keeps a&lt;br&gt;
fetched file for about 24 hours when the answer sets no cache headers,&lt;br&gt;
as here&lt;br&gt;
(&lt;code&gt;WELL_KNOWN_DEFAULT_CACHE_PERIOD&lt;/code&gt; in&lt;br&gt;
&lt;a href="https://github.com/element-hq/synapse/blob/v1.164.2/synapse/http/federation/well_known_resolver.py" rel="noopener noreferrer"&gt;&lt;code&gt;well_known_resolver.py&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
The local run's log shows a single fetch of it before &lt;code&gt;a.example.test&lt;/code&gt;&lt;br&gt;
was restarted. Without the option, &lt;code&gt;b.example.test&lt;/code&gt; no longer serves the&lt;br&gt;
file. A server that has not fetched it before falls back to port 8448,&lt;br&gt;
as &lt;code&gt;a.example.test&lt;/code&gt; does after its restart in the next case. The Service&lt;br&gt;
&lt;code&gt;matrix-tls&lt;/code&gt; that the name resolves to has no port 8448, and what such a&lt;br&gt;
join returns is not tested.&lt;/p&gt;
&lt;h3&gt;
  
  
  Without ip_range_whitelist on a.example.test
&lt;/h3&gt;

&lt;p&gt;The copy leaves the two lines of &lt;code&gt;ip_range_whitelist&lt;/code&gt; out of the class&lt;br&gt;
&lt;code&gt;federated&lt;/code&gt;, and &lt;code&gt;check&lt;/code&gt; compiles only &lt;code&gt;synapse-a&lt;/code&gt; from it. &lt;code&gt;federate.sh&lt;/code&gt;&lt;br&gt;
first puts &lt;code&gt;b.example.test&lt;/code&gt; back on its ConfigMap with the option, then&lt;br&gt;
applies the copy's ConfigMap to &lt;code&gt;a.example.test&lt;/code&gt; and replaces its pod. A&lt;br&gt;
join of &lt;code&gt;#fed-open:b.example.test&lt;/code&gt; then has to return 502.&lt;/p&gt;

&lt;p&gt;It returns 502 with &lt;code&gt;M_UNKNOWN&lt;/code&gt;. &lt;code&gt;b.example.test&lt;/code&gt; resolves to the address&lt;br&gt;
of the Service &lt;code&gt;matrix-tls&lt;/code&gt; in &lt;code&gt;synapse-b&lt;/code&gt;. That address lies in kind's&lt;br&gt;
Service range &lt;code&gt;10.96.0.0/12&lt;/code&gt;, inside &lt;code&gt;10.0.0.0/8&lt;/code&gt; of the default&lt;br&gt;
&lt;code&gt;ip_range_blacklist&lt;/code&gt;. In the local run, the restarted Synapse fetched&lt;br&gt;
the well-known file again, and that failed on the blocked address. For&lt;br&gt;
the join it then logged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Blocked &amp;lt;address&amp;gt; from DNS resolution to b.example.test
Failed to connect to b.example.test:8448: DNS lookup failed: no results for hostname lookup: b.example.test.
SynapseError: 502 - Failed to fetch alias
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&amp;lt;address&amp;gt;&lt;/code&gt; stands for the address of that Service. Synapse removes a&lt;br&gt;
blocked address from the DNS answer, so no address was left to connect&lt;br&gt;
to, and the alias lookup ended in 502.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the CI run showed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42362659622" rel="noopener noreferrer"&gt;Run 42362659622&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;3e1dd74&lt;/code&gt; of main on 7 November&lt;br&gt;
2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner. The folder &lt;code&gt;matrix-federation&lt;/code&gt;&lt;br&gt;
is the one that&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/172" rel="noopener noreferrer"&gt;kadet-hub/examples#172&lt;/a&gt;&lt;br&gt;
merged. The durations below come from the log's timestamps, in whole&lt;br&gt;
seconds.&lt;/p&gt;

&lt;p&gt;Verifying the index, the three recipes and the two generators, and&lt;br&gt;
pulling them, took 24 seconds. The refs and the two compiles took 15&lt;br&gt;
more, and the two compiles of the copies 6. kind had the cluster ready 47&lt;br&gt;
seconds after that. Chainsaw needed 122 seconds for the deploy, image&lt;br&gt;
pulls included. &lt;code&gt;federate.sh&lt;/code&gt; printed its first line 18 seconds later,&lt;br&gt;
the second 20 seconds and the third 39 seconds after that. The second&lt;br&gt;
case replaces one Synapse pod, the third two. The whole &lt;code&gt;check&lt;/code&gt;, up to&lt;br&gt;
its last line, took 4 minutes and 51 seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@admin:a.example.test joined #fed:b.example.test (!-SORyCsTcZx0_NA6PCfCVhdx5FRhT0_6H61UKg15r-E) and read 'hello from b.example.test 16733', @admin:b.example.test read 'hello from a.example.test 2533'
b.example.test without the option federation: the join got 404, M_NOT_FOUND
a.example.test without ip_range_whitelist: the join got 502, M_UNKNOWN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What it leaves out
&lt;/h2&gt;

&lt;p&gt;The internet. A public DNS name, a certificate of a public CA,&lt;br&gt;
delegation to another host, port 8448, more than two servers and servers&lt;br&gt;
outside the cluster are not tested.&lt;/p&gt;

&lt;p&gt;Whom a server federates with. With the option, &lt;code&gt;federation_domain_whitelist&lt;/code&gt;&lt;br&gt;
is not set, and Synapse then federates with every server&lt;br&gt;
(&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#federation_domain_whitelist" rel="noopener noreferrer"&gt;&lt;code&gt;federation_domain_whitelist&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
A private federation lists its servers there, in a file of its own such&lt;br&gt;
as &lt;code&gt;kind.yaml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Where the signing keys come from. Synapse needs the signing key of each&lt;br&gt;
server it federates with, and&lt;br&gt;
&lt;a href="https://element-hq.github.io/synapse/v1.164/usage/configuration/config_documentation.html#trusted_key_servers" rel="noopener noreferrer"&gt;&lt;code&gt;trusted_key_servers&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
names the servers it downloads keys from. Without the option, the recipe&lt;br&gt;
sets it to &lt;code&gt;[]&lt;/code&gt;. The option replaces that file, so Synapse falls back to&lt;br&gt;
&lt;code&gt;matrix.org&lt;/code&gt; and warns about it when it starts. In the local run,&lt;br&gt;
&lt;code&gt;a.example.test&lt;/code&gt; asked &lt;code&gt;matrix.org&lt;/code&gt; first for the key of&lt;br&gt;
&lt;code&gt;b.example.test&lt;/code&gt;. That request failed with &lt;code&gt;certificate verify failed&lt;/code&gt;,&lt;br&gt;
because &lt;code&gt;federation_custom_ca_list&lt;/code&gt; leaves only &lt;code&gt;check&lt;/code&gt;'s CA. Synapse&lt;br&gt;
then fetched the key from &lt;code&gt;b.example.test&lt;/code&gt; itself. &lt;code&gt;check&lt;/code&gt; does not test&lt;br&gt;
which way a key came.&lt;/p&gt;

&lt;p&gt;High availability. Each server runs one Synapse pod, and one PostgreSQL&lt;br&gt;
instance because the cluster has one node.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/matrix-synapse-federation-kubernetes/?utm_source=devto&amp;amp;utm_campaign=outreach" 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>
    <item>
      <title>RAG on Kubernetes: Open WebUI answers from documents in Qdrant</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Sat, 28 Nov 2026 00:40:39 +0000</pubDate>
      <link>https://dev.to/kadet-hub/rag-on-kubernetes-open-webui-answers-from-documents-in-qdrant-488g</link>
      <guid>https://dev.to/kadet-hub/rag-on-kubernetes-open-webui-answers-from-documents-in-qdrant-488g</guid>
      <description>&lt;p&gt;A language model answers from what it learned in training. Your own&lt;br&gt;
documents are not part of that. Retrieval-augmented generation (RAG) closes&lt;br&gt;
the gap at question time. The documents are split into chunks, and an&lt;br&gt;
embedding model turns each chunk into a vector, a list of numbers that&lt;br&gt;
places texts with similar meaning close together. A vector database stores&lt;br&gt;
the vectors. For each question, the chat application embeds the question&lt;br&gt;
the same way, asks the database for the nearest chunks and puts them into&lt;br&gt;
the prompt.&lt;/p&gt;

&lt;p&gt;In this stack Open WebUI is the chat application and keeps the knowledge&lt;br&gt;
bases, the collections of documents a chat can draw on. Qdrant is the&lt;br&gt;
vector database. LiteLLM is a proxy that serves one OpenAI-compatible API&lt;br&gt;
for the chat model and the embedding model. Ollama runs both models on the&lt;br&gt;
CPU, behind LiteLLM.&lt;/p&gt;

&lt;p&gt;The stack comes from four &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipes&lt;/a&gt; that kadet-hub&lt;br&gt;
publishes for &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt;. The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/open-webui-rag" rel="noopener noreferrer"&gt;open-webui-rag&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script deploys it to a new&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster on every change and once a week, adds a&lt;br&gt;
document and asks about it. It fails when Open WebUI no longer answers from&lt;br&gt;
the document, and also when the answer holds what only the document says&lt;br&gt;
while the document is out of reach.&lt;/p&gt;
&lt;h2&gt;
  
  
  What each recipe brings
&lt;/h2&gt;

&lt;p&gt;All recipes render with the &lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt;&lt;br&gt;
generator 1.14.0.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/open-webui/" rel="noopener noreferrer"&gt;open-webui&lt;/a&gt; 1.0.1 runs Open WebUI 0.12.5, rebuilt
from Open WebUI's Helm chart 17.5.0, as a StatefulSet with a 2Gi claim
for its SQLite database and uploads. Its option
&lt;code&gt;recipes.open-webui.openai&lt;/code&gt; points Open WebUI at an OpenAI-compatible
endpoint, here LiteLLM.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/litellm/" rel="noopener noreferrer"&gt;litellm&lt;/a&gt; 1.0.0 runs LiteLLM 1.108.0, rebuilt from
LiteLLM's own Helm chart. The target sets the models it serves and its
master key. Its option &lt;code&gt;recipes.litellm.postgresql&lt;/code&gt; adds a database for
virtual keys and spend tracking, which this stack does not use.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/qdrant/" rel="noopener noreferrer"&gt;qdrant&lt;/a&gt; 1.0.0 runs Qdrant 1.20.0 as one node with a
10Gi claim, from Qdrant's own Helm chart. Every request needs the API key
that the target sets. The pod passes the Pod Security level &lt;code&gt;restricted&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/ollama/" rel="noopener noreferrer"&gt;ollama&lt;/a&gt; 1.0.1 runs Ollama 0.33.2 on the CPU. The
models live in an &lt;code&gt;emptyDir&lt;/code&gt;, so a new pod starts without them.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/valkey/" rel="noopener noreferrer"&gt;valkey&lt;/a&gt; 1.0.3 runs Valkey 9.1.2. open-webui includes
it for its websocket state.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How a question travels
&lt;/h2&gt;

&lt;p&gt;Open WebUI sends every chat completion and every embedding request to&lt;br&gt;
LiteLLM. LiteLLM routes the model name &lt;code&gt;chat&lt;/code&gt; to &lt;code&gt;qwen2.5:0.5b&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;embedding&lt;/code&gt; to &lt;code&gt;nomic-embed-text:v1.5&lt;/code&gt;, both in Ollama. Open WebUI writes&lt;br&gt;
the chunks with their vectors to Qdrant and searches them there. Open WebUI's own&lt;br&gt;
connection to Ollama stays off, so Open WebUI knows one URL and two model&lt;br&gt;
names. Which model answers to a name is set in LiteLLM's model list.&lt;/p&gt;
&lt;h2&gt;
  
  
  The fetch inventory
&lt;/h2&gt;

&lt;p&gt;Kapitan 0.36.3 reads the &lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt; before it&lt;br&gt;
fetches dependencies, so the recipes are pinned in a separate fetch&lt;br&gt;
inventory, &lt;code&gt;fetch/targets/recipes.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/ollama:1.0.1@sha256:7d1081b5c348b8c6e119af4a972b91a5543e0fad1f92d494c8a86bd0026d7db2&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/ollama&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/litellm:1.0.0@sha256:1c0b0e14f7d460b4b61be712bd342dd409a82c5cce62760bc2847da82e6a68c3&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/litellm&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/qdrant:1.0.0@sha256:48d3dadaf619d3bf4d640abbfe48a4f46fb1c0ba988b6436531583a8feb6794b&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/qdrant&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/recipes/open-webui:1.0.1@sha256:3af3e706db37531ed72ecfe3810a4d3cd726f3f5ca5ef5ac066ec51bffabebd7&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;inventory/classes/recipes/open-webui&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A recipe's record in the signed &lt;a href="https://kadet-hub.org/glossary/#index" rel="noopener noreferrer"&gt;index&lt;/a&gt; lists the&lt;br&gt;
recipes it includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jq -c &lt;span class="s1"&gt;'.recipes["open-webui"]["1.0.1"].includes[] | [.name, .version]'&lt;/span&gt; index.json
jq -c &lt;span class="s1"&gt;'.recipes["litellm"]["1.0.0"].includes[] | [.name, .version]'&lt;/span&gt; index.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;["ollama","1.0.1"]
["valkey","1.0.3"]
["postgresql","1.1.1"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The registry's consumer workflow adds these at the version and&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#digest" rel="noopener noreferrer"&gt;digest&lt;/a&gt; their record lists, and &lt;code&gt;check&lt;/code&gt; does the same.&lt;br&gt;
open-webui includes ollama for its own option &lt;code&gt;recipes.open-webui.ollama&lt;/code&gt;,&lt;br&gt;
which would run Ollama next to Open WebUI. This stack runs Ollama in a&lt;br&gt;
target of its own instead, which includes the ollama recipe directly, so&lt;br&gt;
the fetch inventory pins it too. Every recipe unpacks into&lt;br&gt;
&lt;code&gt;inventory/classes/recipes/&amp;lt;name&amp;gt;&lt;/code&gt;, so the pin has to be the digest that&lt;br&gt;
open-webui lists. postgresql comes with litellm's record and is verified&lt;br&gt;
and pulled, but no target includes its classes.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; verifies the index, each recipe and each generator the recipes pin&lt;br&gt;
before it pulls them, as the&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/registry/blob/main/docs/consumers.md#verifying-a-recipe-by-hand" rel="noopener noreferrer"&gt;consumer docs&lt;/a&gt;&lt;br&gt;
describe it. The &lt;a href="https://kadet-hub.org/blog/open-webui-searxng-kubernetes/#verify-then-pull-by-digest" rel="noopener noreferrer"&gt;Open WebUI and SearXNG post&lt;/a&gt;&lt;br&gt;
walks through these steps for one recipe.&lt;/p&gt;
&lt;h2&gt;
  
  
  One class, four targets
&lt;/h2&gt;

&lt;p&gt;Each recipe gets a &lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;target&lt;/a&gt; and a namespace of its own.&lt;br&gt;
What more than one target needs sits in one class,&lt;br&gt;
&lt;code&gt;inventory/classes/rag.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;rag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;ollama&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://ollama.ollama.svc:11434&lt;/span&gt;
    &lt;span class="na"&gt;litellm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://litellm.litellm.svc:4000/v1&lt;/span&gt;
    &lt;span class="na"&gt;qdrant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://qdrant.qdrant.svc:6333&lt;/span&gt;
    &lt;span class="na"&gt;chat_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;qwen2.5:0.5b&lt;/span&gt;
    &lt;span class="na"&gt;embedding_model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nomic-embed-text:v1.5&lt;/span&gt;
    &lt;span class="na"&gt;master_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:rag/litellm-master-key||random:str:40}&lt;/span&gt;
    &lt;span class="na"&gt;qdrant_api_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:rag/qdrant-api-key||random:str:40}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The two keys are &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;refs&lt;/a&gt;. The first compile creates a&lt;br&gt;
random value of 40 characters for each and stores it under&lt;br&gt;
&lt;code&gt;refs/rag/&lt;/code&gt;. LiteLLM and Open WebUI read the master key, Qdrant and Open&lt;br&gt;
WebUI the API key, so each key is set once and both ends get the same&lt;br&gt;
value. The base64 backend only encodes, so use one that encrypts, such as&lt;br&gt;
gpg or Vault, for an install that matters.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;inventory/targets/litellm.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;rag&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.litellm&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litellm&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;litellm&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;litellm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;master_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.master_key}&lt;/span&gt;
      &lt;span class="c1"&gt;# The names Open WebUI asks for, routed to the models in Ollama.
&lt;/span&gt;      &lt;span class="na"&gt;model_list&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chat&lt;/span&gt;
          &lt;span class="na"&gt;litellm_params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ollama_chat/${rag.chat_model}&lt;/span&gt;
            &lt;span class="na"&gt;api_base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.ollama}&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;embedding&lt;/span&gt;
          &lt;span class="na"&gt;litellm_params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ollama/${rag.embedding_model}&lt;/span&gt;
            &lt;span class="na"&gt;api_base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.ollama}&lt;/span&gt;
          &lt;span class="na"&gt;model_info&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;embedding&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prefix of &lt;code&gt;model&lt;/code&gt; picks how LiteLLM calls Ollama. With &lt;code&gt;ollama_chat&lt;/code&gt;&lt;br&gt;
it sends chat completions to Ollama's &lt;code&gt;/api/chat&lt;/code&gt;, which LiteLLM's&lt;br&gt;
&lt;a href="https://docs.litellm.ai/docs/providers/ollama" rel="noopener noreferrer"&gt;Ollama docs&lt;/a&gt; recommend.&lt;br&gt;
Embeddings with &lt;code&gt;ollama&lt;/code&gt; go to &lt;code&gt;/api/embed&lt;/code&gt;&lt;br&gt;
(&lt;a href="https://github.com/BerriAI/litellm/blob/v1.108.0/litellm/llms/ollama/completion/handler.py" rel="noopener noreferrer"&gt;&lt;code&gt;handler.py&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
of LiteLLM 1.108.0). The target &lt;code&gt;qdrant&lt;/code&gt; sets &lt;code&gt;applications.qdrant.api_key&lt;/code&gt; to&lt;br&gt;
&lt;code&gt;${rag.qdrant_api_key}&lt;/code&gt;, and the target &lt;code&gt;ollama&lt;/code&gt; sets nothing but its&lt;br&gt;
namespace.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;inventory/targets/open-webui.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;rag&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.open-webui&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.open-webui.openai&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open-webui&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open-webui&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;secret_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:open-webui/secret-key||random:str:40}&lt;/span&gt;
      &lt;span class="c1"&gt;# LiteLLM, for the chat model.
&lt;/span&gt;      &lt;span class="na"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.litellm}&lt;/span&gt;
        &lt;span class="na"&gt;api_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.master_key}&lt;/span&gt;
    &lt;span class="na"&gt;valkey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="c1"&gt;# Part of a URL in the recipe, so letters and digits only.
&lt;/span&gt;      &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:open-webui/valkey-password||random:loweralphanum:40}&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# LiteLLM, for the embeddings. Open WebUI does not take them from
&lt;/span&gt;        &lt;span class="c1"&gt;# OPENAI_API_BASE_URL and OPENAI_API_KEY.
&lt;/span&gt;        &lt;span class="na"&gt;RAG_EMBEDDING_ENGINE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;openai&lt;/span&gt;
        &lt;span class="na"&gt;RAG_EMBEDDING_MODEL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;embedding&lt;/span&gt;
        &lt;span class="na"&gt;RAG_OPENAI_API_BASE_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.litellm}&lt;/span&gt;
        &lt;span class="na"&gt;RAG_OPENAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;secretKeyRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open-webui&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;openai-api-key&lt;/span&gt;
        &lt;span class="na"&gt;VECTOR_DB&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;qdrant&lt;/span&gt;
        &lt;span class="na"&gt;QDRANT_URI&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.qdrant}&lt;/span&gt;
        &lt;span class="na"&gt;QDRANT_API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;secretKeyRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open-webui&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;qdrant-api-key&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;string_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;qdrant-api-key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${rag.qdrant_api_key}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The option &lt;code&gt;openai&lt;/code&gt; sets &lt;code&gt;OPENAI_API_BASE_URL&lt;/code&gt; and &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;, which&lt;br&gt;
Open WebUI uses for the chat models. For embeddings, Open WebUI 0.12.5 reads&lt;br&gt;
&lt;code&gt;RAG_OPENAI_API_BASE_URL&lt;/code&gt; and &lt;code&gt;RAG_OPENAI_API_KEY&lt;/code&gt;. Unset, the URL is&lt;br&gt;
&lt;code&gt;https://api.openai.com/v1&lt;/code&gt;, and the key is empty unless&lt;br&gt;
&lt;code&gt;OPENAI_API_BASE_URL&lt;/code&gt; is that same URL&lt;br&gt;
(&lt;a href="https://github.com/open-webui/open-webui/blob/v0.12.5/backend/open_webui/config.py" rel="noopener noreferrer"&gt;&lt;code&gt;config.py&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
Without the two variables, Open WebUI would ask OpenAI's API for the&lt;br&gt;
embeddings, with an empty key.&lt;br&gt;
&lt;code&gt;RAG_OPENAI_API_KEY&lt;/code&gt; reads the key &lt;code&gt;openai-api-key&lt;/code&gt; that the option writes&lt;br&gt;
into the Secret &lt;code&gt;open-webui&lt;/code&gt;. The Qdrant key is a second key in that&lt;br&gt;
Secret, added under &lt;code&gt;generators.kubernetes.secrets&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;RAG_EMBEDDING_ENGINE: openai&lt;/code&gt;, Open WebUI does not load the&lt;br&gt;
embedding model it otherwise runs in its own process,&lt;br&gt;
&lt;code&gt;sentence-transformers/all-MiniLM-L6-v2&lt;/code&gt;&lt;br&gt;
(&lt;a href="https://github.com/open-webui/open-webui/blob/v0.12.5/backend/open_webui/routers/retrieval.py" rel="noopener noreferrer"&gt;&lt;code&gt;get_ef&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
&lt;code&gt;VECTOR_DB: qdrant&lt;/code&gt; replaces Chroma, which the image otherwise runs&lt;br&gt;
inside Open WebUI, with its data on the claim. Open WebUI copies these settings into&lt;br&gt;
its database on its first start, and later starts keep the database's&lt;br&gt;
values, so a changed value in the target reaches a running instance only&lt;br&gt;
through the admin settings.&lt;/p&gt;
&lt;h2&gt;
  
  
  Compile and deploy
&lt;/h2&gt;

&lt;p&gt;The recipes are written for the omegaconf inventory backend. With Kapitan&lt;br&gt;
0.36.3 and its &lt;code&gt;omegaconf&lt;/code&gt; extra installed as the consumer docs describe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'global:\n  inventory-backend: omegaconf\n'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .kapitan
kapitan compile --parallelism 1
kapitan compile --reveal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first compile creates the refs and the second writes their values&lt;br&gt;
into the Secrets. The first one runs one target at a time, because three&lt;br&gt;
targets read the refs of the class &lt;code&gt;rag&lt;/code&gt;. Kapitan 0.36.3 compiles the&lt;br&gt;
targets in parallel processes, and the first process to need a ref&lt;br&gt;
creates its file. Another process that opens the file in that moment&lt;br&gt;
reads it empty and stops with &lt;code&gt;'NoneType' object has no attribute&lt;br&gt;
'items'&lt;/code&gt;. One local run of &lt;code&gt;check&lt;/code&gt; failed that way before&lt;br&gt;
&lt;code&gt;--parallelism 1&lt;/code&gt; was added. The second compile only reads the refs.&lt;/p&gt;

&lt;p&gt;Qdrant meets the Pod Security level &lt;code&gt;restricted&lt;/code&gt;. Ollama, LiteLLM and Open&lt;br&gt;
WebUI run as root in their images, which &lt;code&gt;restricted&lt;/code&gt; refuses, so their&lt;br&gt;
namespaces enforce &lt;code&gt;baseline&lt;/code&gt;. &lt;code&gt;check&lt;/code&gt; applies the namespaces and all four&lt;br&gt;
targets in one step of a &lt;a href="https://kyverno.github.io/chainsaw/" rel="noopener noreferrer"&gt;Chainsaw&lt;/a&gt;&lt;br&gt;
test, which waits until Ollama, Qdrant, LiteLLM, Valkey and Open WebUI are&lt;br&gt;
ready.&lt;/p&gt;
&lt;h2&gt;
  
  
  Adding a document and asking about it
&lt;/h2&gt;

&lt;p&gt;Ollama starts without models. &lt;code&gt;check&lt;/code&gt; pulls both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n ollama &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/ollama -- ollama pull qwen2.5:0.5b
kubectl -n ollama &lt;span class="nb"&gt;exec&lt;/span&gt; deploy/ollama -- ollama pull nomic-embed-text:v1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The document is &lt;code&gt;tests/document.md&lt;/code&gt;, a page of a made-up lab handbook&lt;br&gt;
with a door code that exists nowhere else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Lab handbook: cold storage
&lt;/span&gt;
The cold storage room of the kadet-hub test lab is on the third floor,
next to the freight elevator. Its door code is 4417-KESTREL. The code
changes on the first Monday of every month.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; signs up the first account, which Open WebUI makes admin, and&lt;br&gt;
adds the document through Open WebUI's API with the account's token:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -fsS -H &lt;span class="s2"&gt;"Authorization: Bearer $token"&lt;/span&gt; -F &lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@document.md \
  &lt;span class="s2"&gt;"$url/api/v1/files/?process_in_background=false"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; jq -r .id&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;knowledge&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;curl -fsS -H &lt;span class="s2"&gt;"Authorization: Bearer $token"&lt;/span&gt; -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"name": "Lab handbook", "description": "The test lab"}'&lt;/span&gt; \
  &lt;span class="s2"&gt;"$url/api/v1/knowledge/create"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; jq -r .id&lt;span class="o"&gt;)&lt;/span&gt;
curl -fsS -H &lt;span class="s2"&gt;"Authorization: Bearer $token"&lt;/span&gt; -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  -d &lt;span class="s2"&gt;"{\"file_id\": \"$file\"}"&lt;/span&gt; &lt;span class="s2"&gt;"$url/api/v1/knowledge/$knowledge/file/add"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;process_in_background=false&lt;/code&gt; makes the upload return only after Open&lt;br&gt;
WebUI has extracted and embedded the text. Adding the file to the&lt;br&gt;
knowledge base embeds it again, into the knowledge base's own collection.&lt;br&gt;
Open WebUI 0.12.5 keeps all knowledge bases in one Qdrant collection,&lt;br&gt;
&lt;code&gt;open-webui_knowledge&lt;/code&gt;, and tells them apart by the field &lt;code&gt;tenant_id&lt;/code&gt;, the&lt;br&gt;
knowledge base's id&lt;br&gt;
(&lt;a href="https://github.com/open-webui/open-webui/blob/v0.12.5/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py" rel="noopener noreferrer"&gt;&lt;code&gt;qdrant_multitenancy.py&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; reads the points of the knowledge base from Qdrant with their&lt;br&gt;
vectors and sends the text of the point that holds the code to LiteLLM's&lt;br&gt;
&lt;code&gt;/v1/embeddings&lt;/code&gt; as the model &lt;code&gt;embedding&lt;/code&gt;. The cosine similarity of the&lt;br&gt;
stored vector and LiteLLM's must be above 0.999.&lt;/p&gt;

&lt;p&gt;The question goes to Open WebUI's chat endpoint with the knowledge base&lt;br&gt;
attached:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"chat"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"stream"&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 class="nl"&gt;"temperature"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"messages"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"What is the door code of the cold storage room in the kadet-hub test lab?"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"files"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"collection"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;knowledge base id&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open WebUI embeds the question through LiteLLM, asks Qdrant for the&lt;br&gt;
nearest chunks of that knowledge base and puts them into the prompt.&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; then asks twice more, once without &lt;code&gt;files&lt;/code&gt; and once with &lt;code&gt;files&lt;/code&gt;&lt;br&gt;
while Qdrant is scaled to zero. Both answers must lack the code, and the&lt;br&gt;
second time Open WebUI must log that the query of the knowledge base&lt;br&gt;
failed.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the CI run showed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42373290544" rel="noopener noreferrer"&gt;Run 42373290544&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;3b9a8ed&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/185" rel="noopener noreferrer"&gt;kadet-hub/examples#185&lt;/a&gt;&lt;br&gt;
on 7 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner. The durations&lt;br&gt;
below are what &lt;code&gt;check&lt;/code&gt; printed, in whole seconds, or come from the log's&lt;br&gt;
timestamps.&lt;/p&gt;

&lt;p&gt;Verifying the index, the four pinned recipes, the two they include and&lt;br&gt;
the two generators, and pulling them, took 39 seconds. Installing Kapitan&lt;br&gt;
with uv and the two compiles took 9 more, for 24 files. kind had the&lt;br&gt;
cluster ready 41 seconds later. The Chainsaw step took 149 seconds, image&lt;br&gt;
pulls included. Ollama and Qdrant were ready after 70 seconds, LiteLLM&lt;br&gt;
after 81, Valkey after 134 and Open WebUI after 149.&lt;/p&gt;

&lt;p&gt;Pulling each model into Ollama took 4 seconds. Uploading the document,&lt;br&gt;
creating the knowledge base and adding the file took 2. Qdrant held one&lt;br&gt;
point for the knowledge base, with 768 dimensions. Its vector and&lt;br&gt;
LiteLLM's embedding of its text had a cosine similarity of 1.&lt;/p&gt;

&lt;p&gt;The answer with the knowledge base attached took 6 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The door code of the cold storage room in the kadet-hub test lab is 4417-KESTREL.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without the knowledge base, the model had no code to give:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I'm sorry, but I cannot provide an answer without knowing the specific details of the "kadet-hub test lab" and the "cold storage room" you're referring to. Could you please provide more information or context about this?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the knowledge base attached and Qdrant scaled to zero, Open WebUI&lt;br&gt;
logged &lt;code&gt;query_collection: 1 collection(s) had failing queries:&lt;br&gt;
8861b94e-db0b-4ef7-aa37-cb06d6279a22&lt;/code&gt;, with the id of the knowledge base,&lt;br&gt;
and the answer again lacked the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I'm sorry, but I cannot provide an answer without knowing the specific details of the "kadet-hub test lab" and its location. Could you please provide me with more information about this lab or the specific door code you're referring to?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code in the first answer therefore came from the document, through&lt;br&gt;
the search in Qdrant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n open-webui port-forward service/open-webui 8080:80
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;code&gt;http://localhost:8080&lt;/code&gt;. The first account that signs up&lt;br&gt;
becomes admin, and Open WebUI then turns signup off, so sign up before&lt;br&gt;
anyone else can reach the Service. Open WebUI's&lt;br&gt;
&lt;a href="https://docs.openwebui.com/features/workspace/knowledge/" rel="noopener noreferrer"&gt;knowledge docs&lt;/a&gt;&lt;br&gt;
create a knowledge base under Workspace, Knowledge, and reference it in a&lt;br&gt;
chat with &lt;code&gt;#&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A model is added in two places: pulled into Ollama, and named in&lt;br&gt;
LiteLLM's &lt;code&gt;model_list&lt;/code&gt; in the target &lt;code&gt;litellm&lt;/code&gt;.&lt;br&gt;
LiteLLM reads its configuration only at start, so the recipe's README&lt;br&gt;
asks for &lt;code&gt;kubectl rollout restart deployment/litellm&lt;/code&gt; after a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it leaves out
&lt;/h2&gt;

&lt;p&gt;GPU. Ollama runs both models on the CPU, and the recipe requests no GPU.&lt;br&gt;
&lt;code&gt;qwen2.5:0.5b&lt;/code&gt; is a 398 MB download with 494 million parameters,&lt;br&gt;
picked to keep the check fast. Pick a larger model by the memory and CPU&lt;br&gt;
the node has free. The stack sets no memory requests or limits for&lt;br&gt;
Ollama.&lt;/p&gt;

&lt;p&gt;Other documents and other file types. &lt;code&gt;check&lt;/code&gt; adds one short Markdown&lt;br&gt;
file, which becomes one chunk. Many documents, PDFs and scanned pages, and&lt;br&gt;
the quality of the search among many chunks are not tested. Hybrid search&lt;br&gt;
and reranking are off, as in Open WebUI's defaults.&lt;/p&gt;

&lt;p&gt;Changing the embedding model. Open WebUI creates &lt;code&gt;open-webui_knowledge&lt;/code&gt;&lt;br&gt;
with the dimension of the first vectors it writes, 768 for&lt;br&gt;
&lt;code&gt;nomic-embed-text:v1.5&lt;/code&gt;&lt;br&gt;
(&lt;a href="https://github.com/open-webui/open-webui/blob/v0.12.5/backend/open_webui/retrieval/vector/dbs/qdrant_multitenancy.py" rel="noopener noreferrer"&gt;&lt;code&gt;_create_multi_tenant_collection&lt;/code&gt;&lt;/a&gt;).&lt;br&gt;
Vectors of two models do not compare, so a new embedding model means&lt;br&gt;
embedding the documents again. &lt;code&gt;check&lt;/code&gt; does not test that.&lt;/p&gt;

&lt;p&gt;Accounts and access. &lt;code&gt;check&lt;/code&gt; uses the admin account only. Knowledge bases&lt;br&gt;
have their own access settings in Open WebUI, which &lt;code&gt;check&lt;/code&gt; does not test.&lt;br&gt;
LiteLLM runs without its database, so there are no virtual keys, budgets&lt;br&gt;
or spend per user. Every request carries the master key. Ollama's API has&lt;br&gt;
no authentication, and no recipe renders a NetworkPolicy. Qdrant requires&lt;br&gt;
its key on every request, and Open WebUI sends it over plain HTTP inside&lt;br&gt;
the cluster.&lt;/p&gt;

&lt;p&gt;TLS and an ingress. All Services are &lt;code&gt;ClusterIP&lt;/code&gt;, and none of the recipes&lt;br&gt;
renders an Ingress or an HTTPRoute.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/open-webui-rag-kubernetes/?utm_source=devto&amp;amp;utm_campaign=outreach" 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>
    <item>
      <title>Keycloak SSO for Gitea, Open WebUI and Miniflux on Kubernetes</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Fri, 27 Nov 2026 01:08:22 +0000</pubDate>
      <link>https://dev.to/kadet-hub/keycloak-sso-for-gitea-open-webui-and-miniflux-on-kubernetes-og6</link>
      <guid>https://dev.to/kadet-hub/keycloak-sso-for-gitea-open-webui-and-miniflux-on-kubernetes-og6</guid>
      <description>&lt;p&gt;Every self-hosted app comes with its own accounts. Single sign-on moves&lt;br&gt;
them to one identity provider. The app sends the browser there to log in&lt;br&gt;
and gets back a token that names the user. Keycloak is such a provider,&lt;br&gt;
and Gitea, Open WebUI and Miniflux can all use it through OpenID Connect&lt;br&gt;
(OIDC).&lt;/p&gt;

&lt;p&gt;Each app that uses Keycloak is a client of it, and each client exists&lt;br&gt;
twice. Keycloak holds a client ID, the redirect URIs it will send a&lt;br&gt;
browser back to, and a client secret. The app holds the same client ID,&lt;br&gt;
the same redirect URI, the same secret and the URL of Keycloak, the&lt;br&gt;
issuer. When one side changes and the other does not, the login breaks.&lt;/p&gt;

&lt;p&gt;This post keeps both sides in one &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#class" rel="noopener noreferrer"&gt;class&lt;/a&gt;. The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/sso-keycloak" rel="noopener noreferrer"&gt;sso-keycloak&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script deploys Keycloak and the apps&lt;br&gt;
to a new &lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster on every change and once a&lt;br&gt;
week. It then logs in with curl as a browser would, and fails when a&lt;br&gt;
step below stops working. The project also signs in to Mattermost and&lt;br&gt;
Synapse, which its README covers and this post leaves out.&lt;/p&gt;
&lt;h2&gt;
  
  
  What each recipe brings {#recipes}
&lt;/h2&gt;

&lt;p&gt;All parts come from &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipes&lt;/a&gt; that kadet-hub&lt;br&gt;
publishes, each in a &lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;target&lt;/a&gt; and a namespace of its&lt;br&gt;
own.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/keycloak/" rel="noopener noreferrer"&gt;keycloak&lt;/a&gt; 1.0.0 renders one &lt;code&gt;Keycloak&lt;/code&gt; resource for
Keycloak 26.8.1 with the &lt;a href="https://kadet-hub.org/generators/keycloak/" rel="noopener noreferrer"&gt;keycloak&lt;/a&gt; generator
1.1.0, and its certificate with the
&lt;a href="https://kadet-hub.org/generators/certmanager/" rel="noopener noreferrer"&gt;certmanager&lt;/a&gt; generator 1.0.2. It includes
&lt;a href="https://kadet-hub.org/recipes/postgresql/" rel="noopener noreferrer"&gt;postgresql&lt;/a&gt; 1.1.0 for the database.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/keycloak-operator/" rel="noopener noreferrer"&gt;keycloak-operator&lt;/a&gt; 1.0.0 is the Keycloak
Operator 26.8.1, which turns that resource into a StatefulSet and
imports realms. It runs only the Keycloak version it was released with.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/cert-manager/" rel="noopener noreferrer"&gt;cert-manager&lt;/a&gt; 1.0.3 and
&lt;a href="https://kadet-hub.org/recipes/cnpg/" rel="noopener noreferrer"&gt;cnpg&lt;/a&gt; 1.0.2 are the operators that Keycloak's
certificate and the PostgreSQL clusters need.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/gitea/" rel="noopener noreferrer"&gt;gitea&lt;/a&gt; 1.0.0 runs Gitea 28.3.0 with its own
postgresql and &lt;a href="https://kadet-hub.org/recipes/valkey/" rel="noopener noreferrer"&gt;valkey&lt;/a&gt; 1.0.2.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/open-webui/" rel="noopener noreferrer"&gt;open-webui&lt;/a&gt; 1.0.0 runs Open WebUI 0.12.5 with
valkey. Its index record also lists ollama, which this project leaves
out.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kadet-hub.org/recipes/miniflux/" rel="noopener noreferrer"&gt;miniflux&lt;/a&gt; 1.0.0 runs Miniflux 2.3.4 with its own
PostgreSQL container.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fetch inventory pins the recipes the targets include. &lt;code&gt;check&lt;/code&gt; adds&lt;br&gt;
the three they include from the signed &lt;a href="https://kadet-hub.org/glossary/#index" rel="noopener noreferrer"&gt;index&lt;/a&gt;,&lt;br&gt;
verifies them all and the four generators they pin, and pulls them by&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#digest" rel="noopener noreferrer"&gt;digest&lt;/a&gt;, as the&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/open-webui-searxng-kubernetes/#verify-then-pull-by-digest" rel="noopener noreferrer"&gt;Open WebUI and SearXNG post&lt;/a&gt;&lt;br&gt;
shows step by step.&lt;/p&gt;
&lt;h2&gt;
  
  
  One class for both sides {#class}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;inventory/classes/sso.yml&lt;/code&gt; is included by Keycloak's target and by each&lt;br&gt;
app's target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sso&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sso.example.test&lt;/span&gt;
    &lt;span class="c1"&gt;# The port is part of the issuer. Browsers and pods use this URL alike.
&lt;/span&gt;    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://${sso.host}:8443&lt;/span&gt;
    &lt;span class="na"&gt;realm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;home&lt;/span&gt;
    &lt;span class="na"&gt;issuer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.url}/realms/${sso.realm}&lt;/span&gt;
    &lt;span class="c1"&gt;# The CA that signs Keycloak's certificate, which every app trusts.
&lt;/span&gt;    &lt;span class="na"&gt;ca&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:sso/ca.crt}&lt;/span&gt;
    &lt;span class="na"&gt;clients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;gitea&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gitea&lt;/span&gt;
        &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://git.example.test&lt;/span&gt;
        &lt;span class="na"&gt;redirect_uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.url}/user/oauth2/keycloak/callback&lt;/span&gt;
        &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:sso/gitea-client-secret||random:str:40}&lt;/span&gt;
        &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git&lt;/span&gt;
      &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;open-webui&lt;/span&gt;
        &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://chat.example.test&lt;/span&gt;
        &lt;span class="na"&gt;redirect_uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.url}/oauth/oidc/callback&lt;/span&gt;
        &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:sso/open-webui-client-secret||random:str:40}&lt;/span&gt;
        &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;chat&lt;/span&gt;
      &lt;span class="c1"&gt;# Miniflux has no group restriction: every user of the realm gets in.
&lt;/span&gt;      &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
        &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://rss.example.test&lt;/span&gt;
        &lt;span class="na"&gt;redirect_uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.miniflux.url}/oauth2/oidc/callback&lt;/span&gt;
        &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:sso/miniflux-client-secret||random:str:40}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The secrets are &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;refs&lt;/a&gt;. The first compile creates each&lt;br&gt;
value and stores it in the refs directory. Keycloak's target and the&lt;br&gt;
app's target name the same ref, so both get the same value. The base64&lt;br&gt;
backend only encodes, so a repository that matters uses one that&lt;br&gt;
encrypts, such as gpg or Vault. The host names end in &lt;code&gt;.test&lt;/code&gt;, a name&lt;br&gt;
RFC 2606 reserves for testing.&lt;/p&gt;
&lt;h2&gt;
  
  
  The realm {#realm}
&lt;/h2&gt;

&lt;p&gt;The target &lt;code&gt;keycloak&lt;/code&gt; turns the class into a KeycloakRealmImport. An&lt;br&gt;
excerpt of &lt;code&gt;inventory/targets/keycloak.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;keycloak&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;instances&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;keycloak&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.url}&lt;/span&gt;
    &lt;span class="na"&gt;realm_imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;home&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;realm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;realm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.realm}&lt;/span&gt;
          &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
          &lt;span class="na"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.group}&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.group}&lt;/span&gt;
            &lt;span class="c1"&gt;# A group no app admits.
&lt;/span&gt;            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;family&lt;/span&gt;
          &lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alice&lt;/span&gt;
              &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alice@example.test&lt;/span&gt;
              &lt;span class="na"&gt;emailVerified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
              &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Alice&lt;/span&gt;
              &lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Example&lt;/span&gt;
              &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
              &lt;span class="na"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/${sso.clients.gitea.group}&lt;/span&gt;
                &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/${sso.clients.open-webui.group}&lt;/span&gt;
              &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;password&lt;/span&gt;
                  &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${escape:PASSWORD_ALICE}&lt;/span&gt;
            &lt;span class="c1"&gt;# bob: the same, in the group family only
&lt;/span&gt;          &lt;span class="na"&gt;clients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;clientId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.id}&lt;/span&gt;
              &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${escape:CLIENT_SECRET_GITEA}&lt;/span&gt;
              &lt;span class="na"&gt;redirectUris&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.redirect_uri}&lt;/span&gt;
              &lt;span class="na"&gt;protocolMappers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;${sso.groups_mapper}&lt;/span&gt;
            &lt;span class="c1"&gt;# open-webui the same way, miniflux without the mapper
&lt;/span&gt;        &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;placeholders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;PASSWORD_ALICE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sso-users&lt;/span&gt;
                &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alice&lt;/span&gt;
            &lt;span class="na"&gt;CLIENT_SECRET_GITEA&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sso-clients&lt;/span&gt;
                &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gitea&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client ID and the redirect URI are&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#interpolation" rel="noopener noreferrer"&gt;interpolations&lt;/a&gt; of the class. The secret is a&lt;br&gt;
placeholder. &lt;code&gt;${escape:CLIENT_SECRET_GITEA}&lt;/code&gt; renders as&lt;br&gt;
&lt;code&gt;${CLIENT_SECRET_GITEA}&lt;/code&gt;, which the operator's import job replaces with&lt;br&gt;
the key &lt;code&gt;gitea&lt;/code&gt; of the Secret &lt;code&gt;sso-clients&lt;/code&gt;. The target renders that&lt;br&gt;
Secret with the &lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator from the&lt;br&gt;
same refs the apps read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;sso-clients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;string_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;gitea&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.secret}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The users' passwords work the same way, from refs with a &lt;code&gt;random&lt;/code&gt;&lt;br&gt;
function in the Secret &lt;code&gt;sso-users&lt;/code&gt;. Open WebUI requires an email in the&lt;br&gt;
claims, so every user has one.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sso.groups_mapper&lt;/code&gt;, defined in the target, adds the claim &lt;code&gt;groups&lt;/code&gt; with&lt;br&gt;
the user's group names to the ID token and to the userinfo response.&lt;br&gt;
Gitea and Open WebUI read it, so their clients carry the mapper.&lt;/p&gt;

&lt;p&gt;The keycloak generator 1.1.0 warns about plaintext credentials for each&lt;br&gt;
user and client, although the values are placeholders.&lt;/p&gt;

&lt;p&gt;Keycloak's operator imports a realm only when it does not exist. Its&lt;br&gt;
&lt;a href="https://www.keycloak.org/operator/realm-import" rel="noopener noreferrer"&gt;realm import guide&lt;/a&gt; says&lt;br&gt;
the import never updates or deletes a realm. A client changed in the&lt;br&gt;
class after the first import reaches the compiled manifests but not the&lt;br&gt;
running Keycloak. The operator's &lt;code&gt;KeycloakOIDCClient&lt;/code&gt; resource creates,&lt;br&gt;
updates and deletes a client, as the keycloak generator's README&lt;br&gt;
describes. It is an alpha API of the operator and needs an admin client&lt;br&gt;
for the operator, and this project does not use it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The apps {#apps}
&lt;/h2&gt;

&lt;p&gt;Each app's target reads the same entry of the class. Open WebUI takes&lt;br&gt;
everything from variables, &lt;code&gt;inventory/targets/open-webui.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;open-webui&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;WEBUI_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.url}&lt;/span&gt;
      &lt;span class="na"&gt;ENABLE_OAUTH_SIGNUP&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"True"&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_PROVIDER_NAME&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Keycloak&lt;/span&gt;
      &lt;span class="na"&gt;OPENID_PROVIDER_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.issuer}/.well-known/openid-configuration&lt;/span&gt;
      &lt;span class="na"&gt;OPENID_REDIRECT_URI&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.redirect_uri}&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_CLIENT_ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.id}&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_CLIENT_SECRET&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;secretKeyRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sso-client&lt;/span&gt;
          &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secret&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_SCOPES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;openid email profile&lt;/span&gt;
      &lt;span class="na"&gt;ENABLE_OAUTH_ROLE_MANAGEMENT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"True"&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_ROLES_CLAIM&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;groups&lt;/span&gt;
      &lt;span class="na"&gt;OAUTH_ALLOWED_ROLES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.open-webui.group}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With role management on, Open WebUI 0.12.5 turns away a user whose&lt;br&gt;
&lt;code&gt;groups&lt;/code&gt; claim does not list &lt;code&gt;chat&lt;/code&gt;. &lt;code&gt;get_user_role&lt;/code&gt; in &lt;code&gt;utils/oauth.py&lt;/code&gt;&lt;br&gt;
has three exceptions. The first account Open WebUI creates becomes admin&lt;br&gt;
whatever its groups, and stays admin while it is the only one. A user&lt;br&gt;
without any group gets an account with the role &lt;code&gt;pending&lt;/code&gt; instead of a&lt;br&gt;
refusal. And once a second account exists, every login sets the role&lt;br&gt;
from the groups again, so the first admin keeps admin only in a group&lt;br&gt;
that &lt;code&gt;OAUTH_ADMIN_ROLES&lt;/code&gt; lists, &lt;code&gt;admin&lt;/code&gt; by default. &lt;code&gt;check&lt;/code&gt; tests the&lt;br&gt;
first exception only, by signing &lt;code&gt;alice&lt;/code&gt; in first. The other two are&lt;br&gt;
read from the code.&lt;/p&gt;

&lt;p&gt;Miniflux reads &lt;code&gt;OAUTH2_PROVIDER: oidc&lt;/code&gt;, &lt;code&gt;OAUTH2_OIDC_DISCOVERY_ENDPOINT&lt;/code&gt;&lt;br&gt;
set to the issuer, &lt;code&gt;OAUTH2_REDIRECT_URL&lt;/code&gt;, &lt;code&gt;OAUTH2_CLIENT_ID&lt;/code&gt;, the secret&lt;br&gt;
and &lt;code&gt;OAUTH2_USER_CREATION: 1&lt;/code&gt; the same way. It has no group check.&lt;/p&gt;

&lt;p&gt;Gitea keeps its login sources in its database. &lt;code&gt;app.ini&lt;/code&gt; has no setting&lt;br&gt;
for them, and the admin page or the CLI creates them. The gitea recipe&lt;br&gt;
leaves the chart's OAuth sources out, so the target adds an init&lt;br&gt;
container that runs the CLI after the recipe's &lt;code&gt;configure-gitea&lt;/code&gt;, which&lt;br&gt;
migrates the database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;configure-oauth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${components.gitea.image}&lt;/span&gt;
  &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;bash&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;-ec&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
      &lt;span class="s"&gt;id=$(gitea admin auth list --vertical-bars | awk -F'|' '$2 ~ /^[[:space:]]*keycloak[[:space:]]*$/ {print $1 + 0}')&lt;/span&gt;
      &lt;span class="s"&gt;if [ -n "$id" ]; then cmd="update-oauth --id $id"; else cmd=add-oauth; fi&lt;/span&gt;
      &lt;span class="s"&gt;gitea admin auth $cmd --name keycloak --provider openidConnect \&lt;/span&gt;
        &lt;span class="s"&gt;--key "$CLIENT_ID" --secret "$CLIENT_SECRET" \&lt;/span&gt;
        &lt;span class="s"&gt;--auto-discover-url "$ISSUER/.well-known/openid-configuration" \&lt;/span&gt;
        &lt;span class="s"&gt;--required-claim-name groups --required-claim-value "$GROUP"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ISSUER&lt;/code&gt;, &lt;code&gt;CLIENT_ID&lt;/code&gt; and &lt;code&gt;GROUP&lt;/code&gt; come from the class, &lt;code&gt;CLIENT_SECRET&lt;/code&gt;&lt;br&gt;
from a Secret with the class's ref. The source's name &lt;code&gt;keycloak&lt;/code&gt; is part&lt;br&gt;
of Gitea's redirect URI, which is why the class spells it out. Gitea&lt;br&gt;
signs a user in only when the &lt;code&gt;groups&lt;/code&gt; claim lists &lt;code&gt;git&lt;/code&gt;. Two settings&lt;br&gt;
in &lt;code&gt;app.ini&lt;/code&gt; let it create the account on the first login, named after&lt;br&gt;
&lt;code&gt;preferred_username&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;GITEA__SERVER__ROOT_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${sso.clients.gitea.url}/&lt;/span&gt;
&lt;span class="na"&gt;GITEA__OAUTH2_CLIENT__ENABLE_AUTO_REGISTRATION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"true"&lt;/span&gt;
&lt;span class="na"&gt;GITEA__OAUTH2_CLIENT__USERNAME&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;preferred_username&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Moving an app {#move}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; compiles the targets &lt;code&gt;keycloak&lt;/code&gt; and &lt;code&gt;gitea&lt;/code&gt; once more, in a copy&lt;br&gt;
of the project where only Gitea's &lt;code&gt;url&lt;/code&gt; in the class changed to&lt;br&gt;
&lt;code&gt;http://code.example.test&lt;/code&gt;. The diff of the two compiles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gitea/manifests/gitea/gitea-deploy.yml
-              value: http://git.example.test/
+              value: http://code.example.test/
keycloak/manifests/keycloak/home-keycloakrealmimport.yml
-          - http://git.example.test/user/oauth2/keycloak/callback
+          - http://code.example.test/user/oauth2/keycloak/callback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first pair is Gitea's &lt;code&gt;ROOT_URL&lt;/code&gt;, from which Gitea builds the&lt;br&gt;
redirect URI it sends to Keycloak. The second is the redirect URI the&lt;br&gt;
realm import allows for the client &lt;code&gt;gitea&lt;/code&gt;. Nothing else of the two&lt;br&gt;
targets changes, and &lt;code&gt;check&lt;/code&gt; fails when it does. Both compiles run&lt;br&gt;
without &lt;code&gt;--reveal&lt;/code&gt;, so no secret shows in the diff. A running Keycloak&lt;br&gt;
gets the new redirect URI only with a new realm, as the realm section&lt;br&gt;
explains.&lt;/p&gt;
&lt;h2&gt;
  
  
  The issuer has to match {#issuer}
&lt;/h2&gt;

&lt;p&gt;An OIDC login runs over two channels. The browser goes to Keycloak's login&lt;br&gt;
form and back to the app. The app then talks to Keycloak over its own&lt;br&gt;
connection: it reads the discovery document, exchanges the browser's code&lt;br&gt;
for tokens and checks the ID token's signature. The issuer, a URL, ties&lt;br&gt;
the two together. The app compares the issuer it was configured with to&lt;br&gt;
the &lt;code&gt;issuer&lt;/code&gt; field of the discovery document and to the &lt;code&gt;iss&lt;/code&gt; claim of&lt;br&gt;
the ID token. Scheme, host, port and path all have to be equal.&lt;/p&gt;

&lt;p&gt;Keycloak builds every URL it hands out from its &lt;code&gt;hostname&lt;/code&gt; setting,&lt;br&gt;
&lt;code&gt;https://sso.example.test:8443&lt;/code&gt; here. A pod that reads the discovery&lt;br&gt;
document through the Service name still gets &lt;code&gt;sso.example.test&lt;/code&gt; back, for&lt;br&gt;
the token endpoint and the keys as well. So the pods have to reach&lt;br&gt;
Keycloak under the name the browser uses. In a home network that is&lt;br&gt;
split-horizon DNS or a router that sends the public name back inside.&lt;br&gt;
On kind, &lt;code&gt;check&lt;/code&gt; adds one rule to CoreDNS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rewrite name exact sso.example.test keycloak-service.keycloak.svc.cluster.local answer auto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;answer auto&lt;/code&gt; rewrites the name in the answer back to &lt;code&gt;sso.example.test&lt;/code&gt;.&lt;br&gt;
The Service &lt;code&gt;keycloak-service&lt;/code&gt;, which the operator creates, listens on&lt;br&gt;
8443, so the issuer keeps that port.&lt;/p&gt;

&lt;p&gt;To see the pitfall, &lt;code&gt;check&lt;/code&gt; points Miniflux at the in-cluster name, the&lt;br&gt;
value that looks right from inside the cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OAUTH2_OIDC_DISCOVERY_ENDPOINT=https://keycloak-service.keycloak.svc:8443/realms/home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the next login Miniflux reads the discovery document, and go-oidc,&lt;br&gt;
the OIDC library it uses, refuses it. The browser never reaches Keycloak,&lt;br&gt;
and Miniflux logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;level=ERROR msg="Failed to initialize OIDC provider" error="oidc: failed to initialize provider \"https://keycloak-service.keycloak.svc:8443/realms/home\": oidc: issuer URL provided to client (\"https://keycloak-service.keycloak.svc:8443/realms/home\") did not match the issuer URL returned by provider (\"https://sso.example.test:8443/realms/home\")"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Miniflux 2.3.4 reads the discovery document on every login&lt;br&gt;
(&lt;code&gt;getOAuth2Manager&lt;/code&gt; in &lt;code&gt;internal/ui/auth.go&lt;/code&gt;), so the error repeats with&lt;br&gt;
each attempt while the rest of Miniflux keeps running.&lt;/p&gt;
&lt;h2&gt;
  
  
  TLS with a CA from refs {#tls}
&lt;/h2&gt;

&lt;p&gt;Keycloak serves HTTPS with a certificate from cert-manager. The apps&lt;br&gt;
check that certificate on their channel, so they need the CA that&lt;br&gt;
signed it. Here the CA is two refs. &lt;code&gt;check&lt;/code&gt; creates it once per run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:prime256v1 -nodes -days 2 \
  -subj &lt;span class="s1"&gt;'/CN=sso-keycloak example CA'&lt;/span&gt; -addext &lt;span class="nv"&gt;basicConstraints&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;critical,CA:TRUE \
  -addext &lt;span class="nv"&gt;keyUsage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;critical,keyCertSign,cRLSign -keyout ca.key -out ca.crt
kapitan refs --write base64:sso/ca.crt -f ca.crt
kapitan refs --write base64:sso/ca.key -f ca.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ec_paramgen_curve:prime256v1&lt;/code&gt; is OpenSSL's name for the curve P-256.&lt;br&gt;
A repository runs this once and commits the refs. The target &lt;code&gt;keycloak&lt;/code&gt;&lt;br&gt;
renders both halves as the Secret &lt;code&gt;sso-ca&lt;/code&gt; and the&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/certmanager/" rel="noopener noreferrer"&gt;certmanager&lt;/a&gt; generator renders the CA Issuer&lt;br&gt;
&lt;code&gt;sso-ca&lt;/code&gt; that issues Keycloak's certificate. Each app target renders a&lt;br&gt;
Secret &lt;code&gt;sso-ca&lt;/code&gt; with the certificate only, mounts it at &lt;code&gt;/etc/sso&lt;/code&gt; and&lt;br&gt;
sets &lt;code&gt;SSL_CERT_FILE&lt;/code&gt; to &lt;code&gt;/etc/sso/ca.crt&lt;/code&gt;. With it, all three apps&lt;br&gt;
trust Keycloak's certificate.&lt;/p&gt;

&lt;p&gt;Gitea's CLI reads the discovery document when it adds the source, so&lt;br&gt;
the init container needs the variable too. Without it, the first local&lt;br&gt;
run stopped with &lt;code&gt;x509: certificate signed by unknown authority&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Logging in like a browser {#login}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; runs curl on the CI runner, with one cookie jar per user. It&lt;br&gt;
reaches Keycloak and the apps through &lt;code&gt;kubectl port-forward&lt;/code&gt; and curl's&lt;br&gt;
&lt;code&gt;--connect-to&lt;/code&gt;, which sends a request for &lt;code&gt;sso.example.test:8443&lt;/code&gt; to the&lt;br&gt;
local end of the port-forward and keeps the URL as it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl --cacert ca.pem -b &lt;span class="s2"&gt;"$jar"&lt;/span&gt; -c &lt;span class="s2"&gt;"$jar"&lt;/span&gt; -L \
  --connect-to sso.example.test:8443:127.0.0.1:18443 \
  --connect-to git.example.test:80:127.0.0.1:13000 \
  http://git.example.test/user/oauth2/keycloak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here 18443 and 13000 stand for the local ends of the port-forwards to&lt;br&gt;
Keycloak and Gitea. &lt;code&gt;check&lt;/code&gt; lets kubectl pick free ones.&lt;/p&gt;

&lt;p&gt;That URL sends the browser to Keycloak, which answers with its login&lt;br&gt;
form. &lt;code&gt;check&lt;/code&gt; posts the user name and password to the form's &lt;code&gt;action&lt;/code&gt;.&lt;br&gt;
Keycloak redirects back to the app's redirect URI with a code, and the&lt;br&gt;
app redirects to its start page once it has the tokens. Without an&lt;br&gt;
&lt;code&gt;/etc/hosts&lt;/code&gt; entry, the browser side uses the same issuer as the pods.&lt;/p&gt;

&lt;p&gt;Each app then names the user of its session. Gitea 28.3.0 accepts only&lt;br&gt;
tokens on its API, so &lt;code&gt;check&lt;/code&gt; reads the user name from Gitea's settings&lt;br&gt;
page. Open WebUI's &lt;code&gt;/api/v1/auths/&lt;/code&gt; returns the user. Miniflux's pages&lt;br&gt;
carry &lt;code&gt;Logged in as &amp;lt;user&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the CI run showed {#ci}
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42114834453" rel="noopener noreferrer"&gt;Run 42114834453&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;587e44b&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/156" rel="noopener noreferrer"&gt;kadet-hub/examples#156&lt;/a&gt;&lt;br&gt;
on 5 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner. The durations&lt;br&gt;
below come from the log's timestamps or from what &lt;code&gt;check&lt;/code&gt; printed, in&lt;br&gt;
whole seconds.&lt;/p&gt;

&lt;p&gt;Verifying the index, the ten recipes and the four generators, and&lt;br&gt;
pulling them, took 70 seconds. Creating the CA and the refs, installing&lt;br&gt;
Kapitan with uv and the two compiles took 13 more, for 126 files, and&lt;br&gt;
the compiles of the moved copy 5. kind had the cluster ready 39 seconds&lt;br&gt;
later. The three operators had rolled out 24 seconds after that. Keycloak's&lt;br&gt;
PostgreSQL was ready 30 seconds later, Keycloak after 28 more, and the&lt;br&gt;
realm import done after another 23, 105 seconds after the cluster in&lt;br&gt;
all. The apps took 91 seconds more, image pulls included. Then &lt;code&gt;check&lt;/code&gt;&lt;br&gt;
printed this within 4 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;issuer https://sso.example.test:8443/realms/home
gitea: alice signed in as alice with her password, ended at http://git.example.test/
open-webui: alice signed in as alice@example.test through Keycloak's session, ended at http://chat.example.test/auth
miniflux: alice signed in as alice through Keycloak's session, ended at http://rss.example.test/unread
open-webui: alice has the role admin
a wrong password: Keycloak answered 'Invalid username or password.' and no app has a session
gitea: bob, not in git, got 'Sign-In Prohibited' and no session
open-webui: bob, not in chat, was sent to /auth with 'You do not have permission to access this resource. Please contact your administrator for assistance.' and no session
miniflux: bob signed in as bob
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first line is the &lt;code&gt;issuer&lt;/code&gt; of the discovery document, read by curl&lt;br&gt;
through the port-forward. It equals the one the pods see. &lt;code&gt;alice&lt;/code&gt; typed&lt;br&gt;
her password once, on Gitea's login. Open WebUI and Miniflux sent the&lt;br&gt;
browser to Keycloak, which found her session cookie and sent it straight&lt;br&gt;
back with a code. That is the single sign-on. Open WebUI ends on its&lt;br&gt;
page &lt;code&gt;/auth&lt;/code&gt;, which takes the session token from the cookie it set.&lt;br&gt;
&lt;code&gt;alice&lt;/code&gt; is admin there, because hers was the first account.&lt;/p&gt;

&lt;p&gt;The wrong password ended on Keycloak's form for each of the three apps,&lt;br&gt;
and none of them had a session afterwards. &lt;code&gt;bob&lt;/code&gt; has a valid password&lt;br&gt;
and a Keycloak session after his first try, so the second and third&lt;br&gt;
app were again a redirect without a form. Gitea and Open WebUI refused&lt;br&gt;
him after reading the &lt;code&gt;groups&lt;/code&gt; claim, and Miniflux, which reads no&lt;br&gt;
group, let him in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it leaves out {#gaps}
&lt;/h2&gt;

&lt;p&gt;Changes after the first import. The realm import creates the realm once,&lt;br&gt;
as described above.&lt;/p&gt;

&lt;p&gt;Logout, token refresh and a second factor. The check signs in only.&lt;br&gt;
Back-channel logout, where Keycloak tells the apps that a session ended,&lt;br&gt;
needs each app to support it and is not set up.&lt;/p&gt;

&lt;p&gt;TLS to the apps. The apps serve plain HTTP on their Services, and the&lt;br&gt;
browser reaches them through a port-forward. An ingress or Gateway with&lt;br&gt;
certificates for &lt;code&gt;git.example.test&lt;/code&gt; and the other names belongs in front&lt;br&gt;
of them, and the redirect URIs in the class then start with &lt;code&gt;https://&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;High availability. Keycloak and both PostgreSQL clusters run one&lt;br&gt;
instance each, because the cluster has one node.&lt;/p&gt;

&lt;p&gt;Open WebUI's &lt;code&gt;pending&lt;/code&gt; account for a user without a group, and the role&lt;br&gt;
it sets on each login once a second account exists. Both are read from&lt;br&gt;
Open WebUI's code, not tested.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/keycloak-sso-self-hosted-apps/?utm_source=devto&amp;amp;utm_campaign=outreach" 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>
    <item>
      <title>Try Kapitan in your browser</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Thu, 26 Nov 2026 01:08:19 +0000</pubDate>
      <link>https://dev.to/kadet-hub/try-kapitan-in-your-browser-5hii</link>
      <guid>https://dev.to/kadet-hub/try-kapitan-in-your-browser-5hii</guid>
      <description>&lt;p&gt;Seeing what &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt; does usually starts with&lt;br&gt;
installing Python and Kapitan and writing an&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt;. The &lt;a href="https://kadet-hub.org/playground/" rel="noopener noreferrer"&gt;playground&lt;/a&gt; skips&lt;br&gt;
that. It runs Kapitan 0.36.3 in a browser tab with Pyodide, CPython&lt;br&gt;
compiled to WebAssembly. You edit a &lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;target&lt;/a&gt;, its&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#class" rel="noopener noreferrer"&gt;classes&lt;/a&gt; or a &lt;a href="https://kadet-hub.org/glossary/#kadet" rel="noopener noreferrer"&gt;kadet&lt;/a&gt; component, and&lt;br&gt;
the page shows the files Kapitan compiles.&lt;/p&gt;

&lt;p&gt;Nothing loads until you press "Start the playground". The page names the&lt;br&gt;
download next to the button, about 13 MB from kadet-hub.org. It holds&lt;br&gt;
Pyodide 314.0.7 and Kapitan 0.36.3, the version kadet-hub's&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#gate" rel="noopener noreferrer"&gt;gate&lt;/a&gt; compiles with.&lt;/p&gt;

&lt;h2&gt;
  
  
  Five minutes in the playground
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://kadet-hub.org/playground/" rel="noopener noreferrer"&gt;kadet-hub.org/playground/&lt;/a&gt; and press "Start the
playground". The example "Inventory basics" compiles first: two classes,
a target, a kadet component and a Jinja2 template.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;inventory/targets/dev.yml&lt;/code&gt;, change &lt;code&gt;replicas: 3&lt;/code&gt; to &lt;code&gt;replicas: 5&lt;/code&gt;
and press Ctrl+Enter. The compiled &lt;code&gt;dev/docs/README.md&lt;/code&gt; now reads
"Image nginx:1.27, 5 replicas."&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;app.replicas&lt;/code&gt; into "Why is this value set?" and open the entry.
It lists every file that set the value, in merge order: &lt;code&gt;common&lt;/code&gt; set 1,
&lt;code&gt;apps.web&lt;/code&gt; set 2, and the target set the final value.&lt;/li&gt;
&lt;li&gt;Choose the example "kubernetes generator", switch the inventory backend
to reclass and compile again. The target compiles to the same four
files as under omegaconf: a ConfigMap, a Deployment, a Service, and one
file with the autoscaler and the disruption budget.&lt;/li&gt;
&lt;li&gt;Break the YAML on purpose, for example by changing &lt;code&gt;replicas: 5&lt;/code&gt; to
&lt;code&gt;replicas: [5&lt;/code&gt;. The page shows Kapitan's own error with file, line and
column.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The examples
&lt;/h2&gt;

&lt;p&gt;The page offers five examples. Each one says which backends it is tested&lt;br&gt;
with.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;What it compiles&lt;/th&gt;
&lt;th&gt;Backends&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Inventory basics&lt;/td&gt;
&lt;td&gt;Two classes merge into a target, and a kadet component and a Jinja2 template read the result&lt;/td&gt;
&lt;td&gt;omegaconf&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;kubernetes generator&lt;/td&gt;
&lt;td&gt;The usage example of the &lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator's README&lt;/td&gt;
&lt;td&gt;omegaconf, reclass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terraform generator for Open Telekom Cloud&lt;/td&gt;
&lt;td&gt;Terraform JSON for a VPC with two subnets, NAT egress and an encrypted state bucket, from the &lt;a href="https://kadet-hub.org/generators/terraform-opentelekomcloud/" rel="noopener noreferrer"&gt;terraform-opentelekomcloud&lt;/a&gt; generator&lt;/td&gt;
&lt;td&gt;omegaconf, reclass&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recipe uptime-kuma&lt;/td&gt;
&lt;td&gt;The &lt;a href="https://kadet-hub.org/recipes/uptime-kuma/" rel="noopener noreferrer"&gt;uptime-kuma&lt;/a&gt; &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt; and the target of its README&lt;/td&gt;
&lt;td&gt;omegaconf&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recipe blackbox-exporter next to its Helm chart&lt;/td&gt;
&lt;td&gt;The &lt;a href="https://kadet-hub.org/recipes/blackbox-exporter/" rel="noopener noreferrer"&gt;blackbox-exporter&lt;/a&gt; recipe, shown next to &lt;code&gt;helm template&lt;/code&gt; of the chart it rebuilds&lt;/td&gt;
&lt;td&gt;omegaconf&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Generator and recipe files come from their published artifacts, pulled by&lt;br&gt;
the digest the index lists. The recipe examples run on omegaconf only. A&lt;br&gt;
recipe's &lt;code&gt;init.yml&lt;/code&gt; lists &lt;code&gt;.uptime-kuma&lt;/code&gt;, which omegaconf reads as the file&lt;br&gt;
next to it and reclass as the class itself. The page says that reclass&lt;br&gt;
cannot read these inventories and shows reclass's error.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where a value comes from
&lt;/h2&gt;

&lt;p&gt;After each compile, the section "Where the values come from" lists the&lt;br&gt;
selected target's classes in the order the backend merged them. It says&lt;br&gt;
whether the other backend merges the same class files in the same order.&lt;br&gt;
Below that, every parameter names the file that set its final value. Opening&lt;br&gt;
a parameter shows the values it overrode, and an interpolated value shows&lt;br&gt;
both its raw and its resolved form.&lt;/p&gt;

&lt;p&gt;Kapitan 0.36.3 does not record where a value came from. The page therefore&lt;br&gt;
replays the backend's merge from the class files. It compares the replay&lt;br&gt;
with the inventory Kapitan rendered on every compile and names every path&lt;br&gt;
where the two differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same Kapitan as the gate
&lt;/h2&gt;

&lt;p&gt;Kapitan's code is unchanged. A browser has no processes, so the page&lt;br&gt;
replaces &lt;code&gt;multiprocessing&lt;/code&gt;'s pool, which Kapitan opens for every compile,&lt;br&gt;
with one that compiles targets one after another. Kapitan imports some&lt;br&gt;
modules on its compile path without calling them, such as GitPython,&lt;br&gt;
copier and the clients of the refs backends. The page serves those as&lt;br&gt;
empty modules.&lt;/p&gt;

&lt;p&gt;A workflow compiles every example under each of its backends twice: in&lt;br&gt;
Pyodide and in the container image the gate compiles with. It fails when&lt;br&gt;
one file differs by a byte. It runs on every change to the playground and&lt;br&gt;
daily against the published index, because a new generator or recipe&lt;br&gt;
version changes the examples without a pull request here.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does not run
&lt;/h2&gt;

&lt;p&gt;These parts of Kapitan are not available in the browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The reclass-rs backend, the gate's default. It is a Rust extension with
no WebAssembly build. The reclass backend in the playground reads the
same syntax.&lt;/li&gt;
&lt;li&gt;The jsonnet input, which needs a native extension.&lt;/li&gt;
&lt;li&gt;The helm, kustomize, CUE and external inputs, which run a subprocess.&lt;/li&gt;
&lt;li&gt;Fetching dependencies, which needs the network.&lt;/li&gt;
&lt;li&gt;Refs, Kapitan's secrets backends.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Terraform example writes &lt;code&gt;*.tf.json&lt;/code&gt; files. &lt;code&gt;terraform init&lt;/code&gt;, &lt;code&gt;plan&lt;/code&gt;&lt;br&gt;
and &lt;code&gt;apply&lt;/code&gt; do not run. Terraform is a native binary that downloads the&lt;br&gt;
provider, and a plan needs the cloud's credentials. In the&lt;br&gt;
blackbox-exporter example, the Helm side was rendered by &lt;code&gt;helm template&lt;/code&gt;&lt;br&gt;
when the site was built. The page labels it that way, and your edits do&lt;br&gt;
not change it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How long the first start takes
&lt;/h2&gt;

&lt;p&gt;Most of a cold start is CPU, not download. Pyodide ships Python's standard&lt;br&gt;
library and the wheels as source, so every start would compile several&lt;br&gt;
hundred modules to bytecode. The site ships that bytecode instead, compiled&lt;br&gt;
by the same Pyodide in the same build.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/kadet-hub/registry/blob/main/docs/specs/playground.md#start-up" rel="noopener noreferrer"&gt;playground's spec&lt;/a&gt;&lt;br&gt;
records the measurement behind this. It was taken on a prototype of the&lt;br&gt;
page in headless Chrome 156 on a shared 24-core x86_64 host, with the&lt;br&gt;
files served from localhost. The values are seconds from&lt;br&gt;
navigation to the first compiled output, the median of three runs. The&lt;br&gt;
second column limits Chrome to a quarter of one core, as a stand-in for a&lt;br&gt;
phone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variant&lt;/th&gt;
&lt;th&gt;First output&lt;/th&gt;
&lt;th&gt;Quarter of one core&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Unchanged Pyodide and wheels&lt;/td&gt;
&lt;td&gt;11.0 s&lt;/td&gt;
&lt;td&gt;51.9 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Precompiled bytecode, cryptography, requests and jsonschema left out (chosen)&lt;/td&gt;
&lt;td&gt;3.4 s&lt;/td&gt;
&lt;td&gt;26.5 s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A real phone has not been measured. CI tests the page in Chrome only.&lt;/p&gt;

&lt;h2&gt;
  
  
  What leaves your browser
&lt;/h2&gt;

&lt;p&gt;Kapitan runs in a Web Worker of the page. What you type is not sent&lt;br&gt;
anywhere, and the page does not load a project from a URL or from another&lt;br&gt;
origin. After the start, every request is a GET for a file from&lt;br&gt;
kadet-hub.org, which a browser test in CI checks. The page view itself is&lt;br&gt;
counted like every other page, as the &lt;a href="https://kadet-hub.org/privacy/" rel="noopener noreferrer"&gt;privacy page&lt;/a&gt; describes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next step
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://kadet-hub.org/quickstart/" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt; takes the uptime-kuma recipe from the&lt;br&gt;
playground to a real cluster. It installs Kapitan 0.36.3 with uv, fetches&lt;br&gt;
and verifies the recipe, compiles it and applies it to a kind cluster on&lt;br&gt;
your machine in about five minutes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/kapitan-playground/?utm_source=devto&amp;amp;utm_campaign=outreach" 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>
    <item>
      <title>Kapitan generator releases, 16 to 22 November 2026</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Wed, 25 Nov 2026 01:34:10 +0000</pubDate>
      <link>https://dev.to/kadet-hub/kapitan-generator-releases-16-to-22-november-2026-4iap</link>
      <guid>https://dev.to/kadet-hub/kapitan-generator-releases-16-to-22-november-2026-4iap</guid>
      <description>&lt;p&gt;Versions published on kadet-hub from 16 to 22 November 2026, each through the gate and signed. The generator page shows each version's output diff against the version before it, its SBOM and the command that verifies it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Generator&lt;/th&gt;
&lt;th&gt;Versions&lt;/th&gt;
&lt;th&gt;Changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/argocd/" rel="noopener noreferrer"&gt;argocd&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.2.0&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/e86d61aaf646dbc6b5401dce2247a0053eaa9b35/argocd/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/talos/" rel="noopener noreferrer"&gt;talos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.4.0, 1.5.0&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/b3eab9aa759150ca09f2e62674401c272cfc7d2e/talos/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  argocd
&lt;/h2&gt;

&lt;h3&gt;
  
  
  argocd 1.2.0
&lt;/h3&gt;

&lt;p&gt;Built for Argo CD 3.6.1.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;install&lt;/code&gt; renders the release manifest of Argo CD 3.6.1 instead of 3.5.6. Against 3.5.6 it adds the headless Service &lt;code&gt;argocd-application-controller&lt;/code&gt;, optional environment variables read from &lt;code&gt;argocd-cmd-params-cm&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt; on &lt;code&gt;*/finalizers&lt;/code&gt; for the server's ClusterRole and the &lt;code&gt;argocd-tls-certs-cm&lt;/code&gt; mount of the application controller. The images move to &lt;code&gt;quay.io/argoproj/argocd:v3.6.1&lt;/code&gt;, &lt;code&gt;ghcr.io/dexidp/dex:v2.46.0&lt;/code&gt; and &lt;code&gt;public.ecr.aws/docker/library/redis:8.10.1-alpine&lt;/code&gt;, pinned by digest. An installation that comes from 3.5 follows Argo CD's &lt;a href="https://github.com/argoproj/argo-cd/blob/v3.6.1/docs/operator-manual/upgrading/3.5-3.6.md" rel="noopener noreferrer"&gt;3.5 to 3.6 upgrade notes&lt;/a&gt;. A mutate patch that sets &lt;code&gt;ARGOCD_REPO_OTLP_HEADERS&lt;/code&gt; on the repo server, for example, has to use &lt;code&gt;ARGOCD_REPO_SERVER_OTLP_HEADERS&lt;/code&gt; now.&lt;/li&gt;
&lt;li&gt;The schemas and CRDs gain &lt;code&gt;directory.disableExtensionFilter&lt;/code&gt; on Application sources and the &lt;code&gt;oci&lt;/code&gt; generator of ApplicationSets, and remove no field. &lt;code&gt;source&lt;/code&gt;, &lt;code&gt;sources&lt;/code&gt; and &lt;code&gt;generators&lt;/code&gt; pass through, so inventories can set them.&lt;/li&gt;
&lt;li&gt;The sidecar of &lt;code&gt;install.cmp&lt;/code&gt; is unchanged, and the repo server's pod still mounts no service account token.&lt;/li&gt;
&lt;li&gt;The upstream files the README cites have the same content at v3.6.1, and their links move to that tag. &lt;code&gt;argocd-cm.yaml&lt;/code&gt; and &lt;code&gt;GetDestinationServer&lt;/code&gt; moved to other lines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Output of inventories without &lt;code&gt;install&lt;/code&gt; is unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  talos
&lt;/h2&gt;

&lt;h3&gt;
  
  
  talos 1.5.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cluster.serviceAccount.accepted&lt;/code&gt; with &lt;code&gt;issuers&lt;/code&gt; and &lt;code&gt;audiences&lt;/code&gt; becomes &lt;code&gt;accepted&lt;/code&gt; of &lt;code&gt;KubeServiceAccountConfig&lt;/code&gt;, so tokens of an earlier control plane endpoint stay valid after the endpoint moves. The compile fails when the key is set without &lt;code&gt;serviceAccount.key&lt;/code&gt; or &lt;code&gt;controlPlane.endpoint&lt;/code&gt;. Output is unchanged for inventories without the key.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  talos 1.4.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;documents&lt;/code&gt; in &lt;code&gt;base&lt;/code&gt; and &lt;code&gt;nodes.&amp;lt;name&amp;gt;&lt;/code&gt; takes Talos multi-documents the generator does not translate, such as &lt;code&gt;FilesystemTrimConfig&lt;/code&gt;, &lt;code&gt;SecurityProfileConfig&lt;/code&gt; and &lt;code&gt;UserVolumeConfig&lt;/code&gt;. They are appended unchanged after the node's generated documents, in list order, on workers as well, and the userdata Secret carries them. A node's list replaces the &lt;code&gt;base&lt;/code&gt; list. The compile fails when an entry lacks &lt;code&gt;apiVersion&lt;/code&gt; or &lt;code&gt;kind&lt;/code&gt;, or repeats the &lt;code&gt;kind&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt; of a document the generator writes for that node. Output is unchanged for inventories without &lt;code&gt;documents&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/releases-2026-11-16/?utm_source=devto&amp;amp;utm_campaign=outreach" 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>
    <item>
      <title>Converting the oauth2-proxy Helm chart to a Kapitan inventory</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Tue, 24 Nov 2026 03:27:52 +0000</pubDate>
      <link>https://dev.to/kadet-hub/converting-the-oauth2-proxy-helm-chart-to-a-kapitan-inventory-18m9</link>
      <guid>https://dev.to/kadet-hub/converting-the-oauth2-proxy-helm-chart-to-a-kapitan-inventory-18m9</guid>
      <description>&lt;p&gt;A Helm user who looks at &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt; usually asks first&lt;br&gt;
whether it can produce what their chart produces, with their values.&lt;br&gt;
&lt;code&gt;kadet-convert&lt;/code&gt; answers that with one command. It renders a chart with&lt;br&gt;
your values file, writes a Kapitan project for the&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator, and proves on two&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; clusters that the project renders the same objects&lt;br&gt;
as &lt;code&gt;helm template&lt;/code&gt;. The proof is the comparison that kadet-hub's&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipes&lt;/a&gt; pass. The converter is part of &lt;code&gt;check&lt;/code&gt; in&lt;br&gt;
kadet-hub/recipes and first shipped in check 0.16.0, tag &lt;code&gt;check-v0.16.0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This post converts the Helm chart of oauth2-proxy, an authentication&lt;br&gt;
proxy, in version 10.7.2 from its Helm repository. Every command below ran&lt;br&gt;
as printed. The outputs come from that run, two of them in part, as the&lt;br&gt;
text says.&lt;/p&gt;
&lt;h2&gt;
  
  
  What you need {#prerequisites}
&lt;/h2&gt;

&lt;p&gt;The converter needs helm, kubectl, kind, Docker, oras, gh and uv on&lt;br&gt;
&lt;code&gt;PATH&lt;/code&gt;, and gh logged in with &lt;code&gt;gh auth login&lt;/code&gt;. gh verifies the generator's&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#attestation" rel="noopener noreferrer"&gt;attestation&lt;/a&gt; before the generator runs. The run&lt;br&gt;
below used helm 4.3.1, kind 0.33.0, kubectl 1.37.2, oras 1.3.6, gh 2.103.3&lt;br&gt;
and uv 0.13.5. One command reads the value map with jq, and the compile&lt;br&gt;
step uses Kapitan 0.36.3.&lt;/p&gt;
&lt;h2&gt;
  
  
  Run the conversion {#run}
&lt;/h2&gt;

&lt;p&gt;Start in an empty directory with a values file. The client ID and both&lt;br&gt;
secrets are placeholders:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir oauth2-proxy-kapitan &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; oauth2-proxy-kapitan
cat &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; values.yaml &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'EOF'&lt;/span&gt;
config:
  clientID: my-client-id
  clientSecret: my-client-secret
  cookieSecret: 0123456789abcdef0123456789abcdef
extraArgs:
  provider: github
  upstream: http://my-app.my-app:8080
EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then convert. &lt;code&gt;uvx&lt;/code&gt; builds the converter from the tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uvx --from &lt;span class="s1"&gt;'git+https://github.com/kadet-hub/recipes@check-v0.16.0#subdirectory=check'&lt;/span&gt; \
  kadet-convert oauth2-proxy --repo https://oauth2-proxy.github.io/manifests --version 10.7.2 \
  --name oauth2-proxy --namespace oauth2-proxy -f values.yaml --out converted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The run took 71 seconds here, including both kind clusters, which the&lt;br&gt;
converter deletes afterwards. It exits 0 when every object is mapped and&lt;br&gt;
equal, 1 when something is not, and 2 when a command fails. This one&lt;br&gt;
exited 0. It writes &lt;code&gt;converted/report.md&lt;/code&gt;, &lt;code&gt;converted/value-map.json&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;converted/render.yaml&lt;/code&gt; with the chart's render, and the Kapitan project in&lt;br&gt;
&lt;code&gt;converted/project/&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The report {#report}
&lt;/h2&gt;

&lt;p&gt;The command prints the report. The line before it, on stderr, names the&lt;br&gt;
generator it verified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generator: kubernetes 1.14.0 (sha256:787129e1eaed, index serial 115), attestation and index verified
# kadet-convert report: oauth2-proxy

## Source

Chart `oauth2-proxy` 10.7.2, archive SHA-256 `bcdd083c2301efee4fb404a188b1ff5728de1638c64502525ba44abf772313a1`; release `oauth2-proxy`, namespace `oauth2-proxy`.

## Objects

4 exact, 1 equal up to accepted classes.

| Object | Class | Details |
|---|---|---|
| `ServiceAccount/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.service_accounts.oauth2-proxy |
| `Secret/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.secrets.oauth2-proxy |
| `ConfigMap/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.configs.oauth2-proxy |
| `Service/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.services.oauth2-proxy |
| `Deployment/oauth2-proxy/oauth2-proxy` | equal up to accepted classes | Selector scheme |

The converted workloads select their pods by the generator's `name` label. A selector is immutable, so `kubectl apply` over a running Helm release fails on these workloads: delete them with `--cascade=orphan` first (CNV-17).

## Permissions

No subject is bound. Equal for users bound to view, edit and admin.

## Secrets

The data of 1 Secret(s) is in `inventory/classes/converted/oauth2-proxy/secrets.yml`, listed in `.gitignore`. Keep it out of git and replace each value with a ref that holds the same base64 value.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each side goes to its own cluster with a server-side dry run. "Exact"&lt;br&gt;
means the API server stored the same object for both. "Equal up to&lt;br&gt;
accepted classes" means the only differences are ones that &lt;code&gt;check&lt;/code&gt; also&lt;br&gt;
accepts for recipes, and the report names them. For the Deployment that is&lt;br&gt;
the selector. The chart selects pods by &lt;code&gt;app.kubernetes.io/name&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;app.kubernetes.io/instance&lt;/code&gt;. The generator selects them by its own label&lt;br&gt;
&lt;code&gt;name: oauth2-proxy&lt;/code&gt;. The converted pods still carry the chart's labels, so&lt;br&gt;
the chart's Service finds them.&lt;/p&gt;

&lt;p&gt;The permission check runs &lt;code&gt;kubectl auth can-i&lt;/code&gt; for every subject on both&lt;br&gt;
clusters. oauth2-proxy binds no role, so only the users bound to the&lt;br&gt;
built-in view, edit and admin roles are compared.&lt;/p&gt;
&lt;h2&gt;
  
  
  Where your values went {#values}
&lt;/h2&gt;

&lt;p&gt;The report ends with the values that reached the inventory. The first rows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Values

358 values: 267 no effect, below a switch that is off, 32 no effect, 30 reached, 22 switch, 5 derived, 2 render error. The full map is `value-map.json`. These values reached inventory fields:

| Value | Inventory fields |
|---|---|
| `config.clientID` | `components.oauth2-proxy.pod_annotations.checksum/secret`, `generators.kubernetes.secrets.oauth2-proxy.data.client-id.value` |
| `config.clientSecret` | `components.oauth2-proxy.pod_annotations.checksum/secret`, `generators.kubernetes.secrets.oauth2-proxy.data.client-secret.value` |
| `config.cookieSecret` | `components.oauth2-proxy.pod_annotations.checksum/secret`, `generators.kubernetes.secrets.oauth2-proxy.data.cookie-secret.value` |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;27 more rows follow, among them &lt;code&gt;replicaCount&lt;/code&gt; in&lt;br&gt;
&lt;code&gt;components.oauth2-proxy.replicas&lt;/code&gt;. The converter finds these by rendering&lt;br&gt;
the chart once per scalar value with that value changed and comparing the&lt;br&gt;
two inventories. &lt;code&gt;value-map.json&lt;/code&gt; holds the class of every value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jq -c &lt;span class="s1"&gt;'.[] | select(.value | IN("replicaCount", "image.tag", "ingress.enabled", "ingress.path", "podDisruptionBudget.enabled"))'&lt;/span&gt; converted/value-map.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"value":"image.tag","class":"derived","fields":["components.oauth2-proxy.image"]}
{"value":"ingress.enabled","class":"switch"}
{"value":"ingress.path","class":"no effect, below a switch that is off"}
{"value":"replicaCount","class":"reached","fields":["components.oauth2-proxy.replicas"]}
{"value":"podDisruptionBudget.enabled","class":"no effect"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A switch adds or removes objects or fields, so no single inventory field&lt;br&gt;
stands for it. &lt;code&gt;ingress.path&lt;/code&gt; changes nothing while &lt;code&gt;ingress.enabled&lt;/code&gt; is&lt;br&gt;
false. A derived value changes a field without appearing in it, as&lt;br&gt;
&lt;code&gt;image.tag&lt;/code&gt; does in the image reference. &lt;code&gt;podDisruptionBudget.enabled&lt;/code&gt;&lt;br&gt;
has no effect with one replica, because the chart renders the budget only&lt;br&gt;
for more than one.&lt;/p&gt;
&lt;h2&gt;
  
  
  Secrets stay out of git {#secrets}
&lt;/h2&gt;

&lt;p&gt;The converted class holds no Secret data. It interpolates each value from&lt;br&gt;
a second class, and the project's &lt;code&gt;.gitignore&lt;/code&gt; lists that class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cat converted/project/inventory/classes/converted/oauth2-proxy/secrets.yml
cat converted/project/.gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Secret data of the chart's render. Keep this file out of git and replace each value with a ref
# that holds the same base64 value, such as ?{gpg:...} (docs/specs/converter.md CNV-10).
parameters:
  applications:
    oauth2-proxy:
      secrets:
        oauth2_proxy__cookie_secret: MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=
        oauth2_proxy__client_secret: bXktY2xpZW50LXNlY3JldA==
        oauth2_proxy__client_id: bXktY2xpZW50LWlk
inventory/classes/converted/oauth2-proxy/secrets.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The values are the base64 of the placeholders in &lt;code&gt;values.yaml&lt;/code&gt;. In the&lt;br&gt;
converted class, the Secret reads them with &lt;code&gt;b64_encode: false&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;          &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;cookie-secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${applications.oauth2-proxy.secrets.oauth2_proxy__cookie_secret}&lt;/span&gt;
              &lt;span class="na"&gt;b64_encode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before the project goes into git, replace each value in &lt;code&gt;secrets.yml&lt;/code&gt; with&lt;br&gt;
a &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;ref&lt;/a&gt; that holds the same base64 value, or move the three&lt;br&gt;
keys into a class of your own that does.&lt;/p&gt;
&lt;h2&gt;
  
  
  Compile it {#compile}
&lt;/h2&gt;

&lt;p&gt;The project compiles without fetching anything. The generator is already&lt;br&gt;
in &lt;code&gt;lib/kubernetes&lt;/code&gt;, pinned by version and digest. With Kapitan 0.36.3&lt;br&gt;
installed as in the &lt;a href="https://kadet-hub.org/quickstart/" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; converted/project &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; kapitan compile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rendered inventory (2.61s): discovered 1 targets.
Compiling 1/1 targets using 1 concurrent processes: (24 CPU available)
oauth2-proxy: container oauth2-proxy has no resources requests.cpu, requests.memory, limits.memory; requests drive scheduling and a memory limit bounds the impact of a leak
Compiled oauth2-proxy (0.02s)
Compiled 1 targets in 0.79s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generator prints the warning because the chart sets no resources by&lt;br&gt;
default.&lt;br&gt;
&lt;code&gt;compiled/oauth2-proxy/manifests/oauth2-proxy/&lt;/code&gt; now holds five files, one&lt;br&gt;
each for the ConfigMap, the Deployment, the ServiceAccount, the Secret and&lt;br&gt;
the Service.&lt;/p&gt;
&lt;h2&gt;
  
  
  Limits {#limits}
&lt;/h2&gt;

&lt;p&gt;A conversion is a one-off migration. The project is yours to edit, and a&lt;br&gt;
later conversion writes a new project instead of merging with your edits.&lt;/p&gt;

&lt;p&gt;The values are frozen. The inventory holds what &lt;code&gt;helm template&lt;/code&gt; rendered&lt;br&gt;
as literals, and the converter writes no parameters. In this run, 30 of&lt;br&gt;
358 values reached an inventory field. To flip a switch such&lt;br&gt;
as &lt;code&gt;ingress.enabled&lt;/code&gt;, convert again with the new value.&lt;/p&gt;

&lt;p&gt;The pod annotations &lt;code&gt;checksum/config&lt;/code&gt; and &lt;code&gt;checksum/secret&lt;/code&gt; are literals&lt;br&gt;
too. Under Helm they changed with the ConfigMap and the Secret and so&lt;br&gt;
rolled the pods. In the converted project, a changed Secret does not&lt;br&gt;
change them.&lt;/p&gt;

&lt;p&gt;A kind the converter does not map yet is reported as not mapped. With&lt;br&gt;
&lt;code&gt;replicaCount: 2&lt;/code&gt;, the chart adds a PodDisruptionBudget, which check&lt;br&gt;
0.16.0 does not map:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ../..
&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;'replicaCount: 2\n'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; replicas.yaml
uvx --from &lt;span class="s1"&gt;'git+https://github.com/kadet-hub/recipes@check-v0.16.0#subdirectory=check'&lt;/span&gt; \
  kadet-convert oauth2-proxy --repo https://oauth2-proxy.github.io/manifests --version 10.7.2 \
  --name oauth2-proxy --namespace oauth2-proxy -f values.yaml -f replicas.yaml --out converted-2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It exits with status 1. The Objects section of its report:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4 exact, 1 equal up to accepted classes, 1 not mapped.

| Object | Class | Details |
|---|---|---|
| `ServiceAccount/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.service_accounts.oauth2-proxy |
| `Secret/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.secrets.oauth2-proxy |
| `ConfigMap/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.configs.oauth2-proxy |
| `Service/oauth2-proxy/oauth2-proxy` | exact | generators.kubernetes.services.oauth2-proxy |
| `Deployment/oauth2-proxy/oauth2-proxy` | equal up to accepted classes | Selector scheme |
| `PodDisruptionBudget/oauth2-proxy/oauth2-proxy` | not mapped | the converter does not map PodDisruptionBudget |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generator itself renders PodDisruptionBudgets, NetworkPolicies and&lt;br&gt;
APIServices. The converter reports them as not mapped until it maps them.&lt;br&gt;
Apart from CRDs, which it copies unchanged, it passes no object through.&lt;br&gt;
The report lists the fields it cannot map under "Not mappable fields".&lt;br&gt;
With check 0.16.0 and the kubernetes generator 1.14.0, which this post&lt;br&gt;
runs, they include a StatefulSet's &lt;code&gt;serviceName&lt;/code&gt; that differs from its own&lt;br&gt;
name and a container's &lt;code&gt;workingDir&lt;/code&gt;. check 0.20.1 pins the generator&lt;br&gt;
1.15.0 and maps that &lt;code&gt;serviceName&lt;/code&gt; to the generator's&lt;br&gt;
&lt;code&gt;statefulset_service_name&lt;/code&gt;. 1.15.0 has a key for &lt;code&gt;workingDir&lt;/code&gt; as well,&lt;br&gt;
but check 0.20.1 does not map it yet and still lists it. A StatefulSet's&lt;br&gt;
&lt;code&gt;podManagementPolicy&lt;/code&gt; has no key in 1.15.0. Objects with a &lt;code&gt;helm.sh/hook&lt;/code&gt;&lt;br&gt;
annotation are left out and listed, such as the three test pods of&lt;br&gt;
podinfo's chart.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--out&lt;/code&gt; must not be named like a chart that comes from a repository. The&lt;br&gt;
converter creates the directory first and then takes the chart name for a&lt;br&gt;
local chart directory. With &lt;code&gt;--out oauth2-proxy&lt;/code&gt;, the command above stops&lt;br&gt;
with exit status 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error: helm show chart oauth2-proxy exited 1:
Error: Chart.yaml file is missing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The new selectors are what make a running release hard to replace. A&lt;br&gt;
selector is immutable, so &lt;code&gt;kubectl apply&lt;/code&gt; of the converted Deployment over&lt;br&gt;
the Helm release fails. The converter's documentation lists the steps.&lt;br&gt;
Delete the Deployment with &lt;code&gt;--cascade=orphan&lt;/code&gt;, so its pods keep running.&lt;br&gt;
Delete the release's &lt;code&gt;sh.helm.release.v1.oauth2-proxy.*&lt;/code&gt; Secrets, so Helm&lt;br&gt;
forgets the release. Apply the compiled manifests with&lt;br&gt;
&lt;code&gt;kubectl apply --server-side --force-conflicts&lt;/code&gt;. Delete the orphaned&lt;br&gt;
ReplicaSet once the new pods are ready. These steps are not tested, so try&lt;br&gt;
them on a test cluster first.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Kapitan's helm input is the better choice {#helm-input}
&lt;/h2&gt;

&lt;p&gt;Kapitan can render a chart itself, with &lt;code&gt;input_type: helm&lt;/code&gt; in the&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt;. The chart stays as it is, Helm runs at&lt;br&gt;
every compile, and a new chart version is a version bump with your values&lt;br&gt;
kept. That is the better choice if you want to keep following upstream&lt;br&gt;
releases of the chart. The converter is for the other case. You want the&lt;br&gt;
objects in your inventory, rendered by a generator you can read, and you&lt;br&gt;
accept that later chart releases do not reach you on their own.&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/helmfile-vs-kapitan/" rel="noopener noreferrer"&gt;Helmfile vs Kapitan&lt;/a&gt; shows the helm input on&lt;br&gt;
podinfo and Valkey, and&lt;br&gt;
&lt;a href="https://kadet-hub.org/guides/generator-helm-or-jinja2/" rel="noopener noreferrer"&gt;Kapitan inputs&lt;/a&gt; compares it with kadet&lt;br&gt;
generators, Jinja2 and Kustomize.&lt;/p&gt;

&lt;p&gt;The converter's usage and design are in&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/recipes/blob/check-v0.16.0/docs/convert.md" rel="noopener noreferrer"&gt;docs/convert.md&lt;/a&gt;&lt;br&gt;
and&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/recipes/blob/check-v0.16.0/docs/specs/converter.md" rel="noopener noreferrer"&gt;docs/specs/converter.md&lt;/a&gt;&lt;br&gt;
in kadet-hub/recipes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/convert-helm-chart-to-kapitan/" 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>
    <item>
      <title>Docker Compose and Kubernetes files compiled from one class</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Mon, 23 Nov 2026 16:24:33 +0000</pubDate>
      <link>https://dev.to/kadet-hub/docker-compose-and-kubernetes-files-compiled-from-one-class-2ke0</link>
      <guid>https://dev.to/kadet-hub/docker-compose-and-kubernetes-files-compiled-from-one-class-2ke0</guid>
      <description>&lt;p&gt;Many self-hosted apps ship a Docker Compose file. Teams that run some of&lt;br&gt;
them on a Docker host and others on Kubernetes end up with a Compose file&lt;br&gt;
and a set of manifests for the same app, with the image, the environment&lt;br&gt;
and the passwords written twice. This post keeps one&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt; &lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt; with two&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;targets&lt;/a&gt; that include the same&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#class" rel="noopener noreferrer"&gt;class&lt;/a&gt;. One compiles Kubernetes manifests, the other a&lt;br&gt;
Compose file.&lt;/p&gt;

&lt;p&gt;The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/compose-kubernetes" rel="noopener noreferrer"&gt;compose-kubernetes&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script deploys the first target to a&lt;br&gt;
new &lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster and starts the second with&lt;br&gt;
&lt;code&gt;docker compose up&lt;/code&gt; on the CI runner, on every change and once a week.&lt;br&gt;
The app is Miniflux, a feed reader, with its PostgreSQL database, from the&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt; &lt;a href="https://kadet-hub.org/recipes/miniflux/" rel="noopener noreferrer"&gt;miniflux&lt;/a&gt; 1.0.0. That&lt;br&gt;
recipe was migrated from Miniflux's own Compose file, so the post also&lt;br&gt;
shows how much of that file comes back.&lt;/p&gt;
&lt;h2&gt;
  
  
  The shared class {#shared}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;inventory/classes/miniflux.yml&lt;/code&gt; is what both targets include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.miniflux.miniflux&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.miniflux.db&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
        &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:miniflux/database-password||random:str:32}&lt;/span&gt;
      &lt;span class="na"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
        &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:miniflux/admin-password||random:str:24}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The two classes it includes come with the recipe. They define the&lt;br&gt;
components &lt;code&gt;miniflux&lt;/code&gt; and &lt;code&gt;miniflux-db&lt;/code&gt; in the format of the&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator: the images pinned by&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#digest" rel="noopener noreferrer"&gt;digest&lt;/a&gt;, the environment, a readiness probe that runs&lt;br&gt;
&lt;code&gt;pg_isready&lt;/code&gt; in the database container, and a volume for PostgreSQL's&lt;br&gt;
data. Miniflux reads its database connection from &lt;code&gt;DATABASE_URL&lt;/code&gt;, which&lt;br&gt;
the recipe builds from the user, the name and the password set here.&lt;/p&gt;

&lt;p&gt;The passwords are &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;refs&lt;/a&gt;. On the first compile, the&lt;br&gt;
&lt;code&gt;random:str&lt;/code&gt; function creates each value from letters, digits, &lt;code&gt;-&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;_&lt;/code&gt;. A URL reserves none of them, and the database password ends up in&lt;br&gt;
&lt;code&gt;DATABASE_URL&lt;/code&gt;. Kapitan stores the values in the refs directory. The&lt;br&gt;
compiled output holds a ref tag such as&lt;br&gt;
&lt;code&gt;?{base64:miniflux/database-password:86e11e39}&lt;/code&gt; until &lt;code&gt;--reveal&lt;/code&gt; or&lt;br&gt;
&lt;code&gt;kapitan refs --reveal&lt;/code&gt; replaces it with the value. The &lt;code&gt;base64&lt;/code&gt; backend&lt;br&gt;
encrypts nothing. A real project uses &lt;code&gt;gpg&lt;/code&gt;, a cloud KMS or Vault for the&lt;br&gt;
same refs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Two targets {#targets}
&lt;/h2&gt;

&lt;p&gt;The target &lt;code&gt;cluster&lt;/code&gt; takes the recipe as a whole:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.miniflux&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cluster&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;pod-security.kubernetes.io/enforce&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;baseline&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;readiness&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/healthcheck&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;recipes.miniflux&lt;/code&gt; is the recipe's &lt;code&gt;init.yml&lt;/code&gt;. It includes the two&lt;br&gt;
component classes again and adds the kubernetes generator's pin and&lt;br&gt;
compile entry. The target adds the namespace, at the Pod Security level&lt;br&gt;
&lt;code&gt;baseline&lt;/code&gt;, because the postgres image starts as root.&lt;/p&gt;

&lt;p&gt;It also adds a readiness probe for Miniflux, which the recipe lacks.&lt;br&gt;
&lt;code&gt;/healthcheck&lt;/code&gt; answers &lt;code&gt;OK&lt;/code&gt; once Miniflux reaches its database. Without&lt;br&gt;
the probe, the rollout counted Miniflux as available as soon as the&lt;br&gt;
container started. In the first CI run, &lt;code&gt;check&lt;/code&gt; then opened a&lt;br&gt;
port-forward to a Miniflux that did not listen yet, and the port-forward&lt;br&gt;
ended at the refused connection. The probe is an HTTP request from the&lt;br&gt;
kubelet, which a Compose health check cannot express, so it belongs in&lt;br&gt;
this target. In the shared class it fails the compile of &lt;code&gt;compose&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The target &lt;code&gt;compose&lt;/code&gt; cannot include &lt;code&gt;init.yml&lt;/code&gt;, because its compile entry&lt;br&gt;
would run the kubernetes generator in this target as well. Setting&lt;br&gt;
&lt;code&gt;compile: []&lt;/code&gt; in the target does not remove that entry. In a local compile&lt;br&gt;
with Kapitan 0.36.3 and the omegaconf backend, the generator still ran. So&lt;br&gt;
the target gets the components&lt;br&gt;
through the shared class only. That is also why the shared class sets the&lt;br&gt;
database user and name and the admin's username, the three values&lt;br&gt;
&lt;code&gt;init.yml&lt;/code&gt; sets too. What the target adds is the compile entry for the&lt;br&gt;
Compose file and what only a Docker host needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;compose&lt;/span&gt;
    &lt;span class="na"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;input_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kadet&lt;/span&gt;
        &lt;span class="na"&gt;input_paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;components/compose&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
        &lt;span class="na"&gt;output_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yml&lt;/span&gt;
  &lt;span class="na"&gt;compose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;127.0.0.1:8080:8080&lt;/span&gt;
        &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;
        &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
      &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  From components to a Compose file {#compose}
&lt;/h2&gt;

&lt;p&gt;kadet-hub's &lt;a href="https://kadet-hub.org/generators/docker/" rel="noopener noreferrer"&gt;docker&lt;/a&gt; generator 1.0.2 renders&lt;br&gt;
Dockerfiles, not Compose files. The Compose file therefore comes from&lt;br&gt;
&lt;code&gt;components/compose/__init__.py&lt;/code&gt;, a &lt;a href="https://kadet-hub.org/glossary/#kadet" rel="noopener noreferrer"&gt;kadet&lt;/a&gt; component&lt;br&gt;
of 77 lines in the example. It reads &lt;code&gt;parameters.components&lt;/code&gt;, the input of&lt;br&gt;
the kubernetes generator, and maps the keys the recipe uses:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component key&lt;/th&gt;
&lt;th&gt;Compose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;image&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;env&lt;/code&gt;, plain value&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;environment&lt;/code&gt;, as a string&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;env&lt;/code&gt; with &lt;code&gt;secretKeyRef&lt;/code&gt; to the component's Secret&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;environment&lt;/code&gt;, with the value from the Secret's &lt;code&gt;string_data&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;healthcheck.readiness&lt;/code&gt; of type &lt;code&gt;command&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;healthcheck&lt;/code&gt; with &lt;code&gt;test: [CMD, ...]&lt;/code&gt;, &lt;code&gt;interval&lt;/code&gt;, &lt;code&gt;timeout&lt;/code&gt; and &lt;code&gt;retries&lt;/code&gt; from the probe or the kubelet's defaults&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;volume_mounts&lt;/code&gt; of a &lt;code&gt;volume_claims&lt;/code&gt; entry&lt;/td&gt;
&lt;td&gt;a named volume, mounted at &lt;code&gt;mount_path&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;application&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;ports&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;volume_claims&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;dropped&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Any other key fails the compile with &lt;code&gt;no Compose mapping for&lt;/code&gt; and the key.&lt;br&gt;
This is deliberate. A key that the cluster gets and the Docker host&lt;br&gt;
silently does not is the drift this setup is meant to prevent. After the&lt;br&gt;
mapping, the component merges the target's &lt;code&gt;compose.services&lt;/code&gt; over the&lt;br&gt;
result.&lt;/p&gt;

&lt;p&gt;Compiled without &lt;code&gt;--reveal&lt;/code&gt;, the target &lt;code&gt;compose&lt;/code&gt; writes&lt;br&gt;
&lt;code&gt;compiled/compose/compose.yml&lt;/code&gt;. This is the file from the CI run below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;ADMIN_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:miniflux/admin-password:80986ca4}&lt;/span&gt;
      &lt;span class="na"&gt;ADMIN_USERNAME&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin&lt;/span&gt;
      &lt;span class="na"&gt;CREATE_ADMIN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'1'&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres://miniflux:?{base64:miniflux/database-password:474bdc35}@miniflux-db/miniflux?sslmode=disable&lt;/span&gt;
      &lt;span class="na"&gt;DEBUG&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'1'&lt;/span&gt;
      &lt;span class="na"&gt;RUN_MIGRATIONS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'1'&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux/miniflux:2.3.4@sha256:72e49f513a63104506aab98ba8cfc3a409d4fde23550a583dec07ec941f1e94e&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;127.0.0.1:8080:8080&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
  &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_DB&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_PASSWORD&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:miniflux/database-password:474bdc35}&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
    &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
      &lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
      &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;CMD&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pg_isready&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;-U&lt;/span&gt;
        &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
      &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;30s&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres:18.6@sha256:edb0c08dc33befd0262ab3b5cf1c4f3f8cfd8b09e88c05b45adee29d6761ddb6&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;miniflux-db:/var/lib/postgresql&lt;/span&gt;
&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  One image, both outputs {#image}
&lt;/h2&gt;

&lt;p&gt;To move Miniflux to another release before the recipe does, the shared&lt;br&gt;
class sets the image of the component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux/miniflux:2.3.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; does this in a copy of the inventory, with the recipe's image and&lt;br&gt;
the next patch version, compiles both targets with and without the change,&lt;br&gt;
and fails unless the image line of the Deployment and of &lt;code&gt;compose.yml&lt;/code&gt;&lt;br&gt;
changed and nothing else. It only compiles that version, so it leaves out&lt;br&gt;
the digest. The diff from the CI run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gu"&gt;diff -ru before/compiled/cluster/manifests/miniflux/miniflux-deploy.yml after/compiled/cluster/manifests/miniflux/miniflux-deploy.yml&lt;/span&gt;
&lt;span class="gd"&gt;--- before/compiled/cluster/manifests/miniflux/miniflux-deploy.yml&lt;/span&gt;
&lt;span class="gi"&gt;+++ after/compiled/cluster/manifests/miniflux/miniflux-deploy.yml&lt;/span&gt;
&lt;span class="gu"&gt;@@ -41,7 +41,7 @@&lt;/span&gt;
                   name: miniflux
             - name: DEBUG
               value: '1'
&lt;span class="gd"&gt;-          image: miniflux/miniflux:2.3.4@sha256:72e49f513a63104506aab98ba8cfc3a409d4fde23550a583dec07ec941f1e94e&lt;/span&gt;
&lt;span class="gi"&gt;+          image: miniflux/miniflux:2.3.5&lt;/span&gt;
           imagePullPolicy: IfNotPresent
           name: miniflux
           ports:
&lt;span class="gu"&gt;diff -ru before/compiled/compose/compose.yml after/compiled/compose/compose.yml&lt;/span&gt;
&lt;span class="gd"&gt;--- before/compiled/compose/compose.yml&lt;/span&gt;
&lt;span class="gi"&gt;+++ after/compiled/compose/compose.yml&lt;/span&gt;
&lt;span class="gu"&gt;@@ -10,7 +10,7 @@&lt;/span&gt;
       DATABASE_URL: postgres://miniflux:?{base64:miniflux/database-password:474bdc35}@miniflux-db/miniflux?sslmode=disable
       DEBUG: '1'
       RUN_MIGRATIONS: '1'
&lt;span class="gd"&gt;-    image: miniflux/miniflux:2.3.4@sha256:72e49f513a63104506aab98ba8cfc3a409d4fde23550a583dec07ec941f1e94e&lt;/span&gt;
&lt;span class="gi"&gt;+    image: miniflux/miniflux:2.3.5&lt;/span&gt;
     ports:
       - 127.0.0.1:8080:8080
     restart: unless-stopped
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both compiles run without &lt;code&gt;--reveal&lt;/code&gt;, so the diff holds ref tags and no&lt;br&gt;
password.&lt;/p&gt;
&lt;h2&gt;
  
  
  Deployed both ways {#deploy}
&lt;/h2&gt;

&lt;p&gt;On kind, &lt;code&gt;check&lt;/code&gt; applies the revealed output of the target &lt;code&gt;cluster&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kapitan compile -t cluster --reveal
kubectl apply -f compiled/cluster/manifests/miniflux-namespace.yml
kubectl apply -R -f compiled/cluster/manifests -l &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;miniflux-db
kubectl -n miniflux rollout status statefulset/miniflux-db
kubectl apply -R -f compiled/cluster/manifests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Namespace goes first, because &lt;code&gt;kubectl apply -R&lt;/code&gt; reads the directory&lt;br&gt;
&lt;code&gt;miniflux/&lt;/code&gt; before the file &lt;code&gt;miniflux-namespace.yml&lt;/code&gt; next to it. The&lt;br&gt;
database goes next, selected by the &lt;code&gt;name&lt;/code&gt; label the generator puts on&lt;br&gt;
every object, and &lt;code&gt;check&lt;/code&gt; waits for its rollout. That step stands in for&lt;br&gt;
the &lt;code&gt;depends_on&lt;/code&gt; of the Compose file, which has no counterpart in&lt;br&gt;
Kubernetes. Miniflux exits while PostgreSQL refuses connections, and the&lt;br&gt;
kubelet restarts it with growing delays. In a local run with everything&lt;br&gt;
applied at once, Miniflux sat in &lt;code&gt;CrashLoopBackOff&lt;/code&gt; when &lt;code&gt;check&lt;/code&gt; stopped&lt;br&gt;
on it.&lt;/p&gt;

&lt;p&gt;On the Docker host, no file has to hold the passwords. &lt;code&gt;check&lt;/code&gt; compiles&lt;br&gt;
the target &lt;code&gt;compose&lt;/code&gt; without &lt;code&gt;--reveal&lt;/code&gt; and reveals into the standard&lt;br&gt;
input of &lt;code&gt;docker compose&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kapitan refs --reveal -f compiled/compose/compose.yml &lt;span class="o"&gt;|&lt;/span&gt;
  docker compose -p miniflux -f - up -d --wait
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--wait&lt;/code&gt; returns once PostgreSQL reports healthy and Miniflux runs. The&lt;br&gt;
values still end up in the containers' environment, where&lt;br&gt;
&lt;code&gt;docker inspect&lt;/code&gt; shows them.&lt;/p&gt;

&lt;p&gt;On both runtimes &lt;code&gt;check&lt;/code&gt; then runs the same steps against Miniflux's port,&lt;br&gt;
through a port-forward to the Service on kind and through the published&lt;br&gt;
port under Compose. &lt;code&gt;/healthcheck&lt;/code&gt; must answer &lt;code&gt;OK&lt;/code&gt;. Logged in as the&lt;br&gt;
admin with the password from the ref, &lt;code&gt;/v1/version&lt;/code&gt; must report the&lt;br&gt;
recipe's tag, and a category created through &lt;code&gt;/v1/categories&lt;/code&gt; must come&lt;br&gt;
back in the list. A category is a row in PostgreSQL, so the last step&lt;br&gt;
shows that Miniflux reached its database with the password from the other&lt;br&gt;
ref.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the CI run showed {#ci}
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42006701130" rel="noopener noreferrer"&gt;Run 42006701130&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;6991df2&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/147" rel="noopener noreferrer"&gt;kadet-hub/examples#147&lt;/a&gt;&lt;br&gt;
on 5 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner, with docker compose&lt;br&gt;
v5.7.0 and the kind node image &lt;code&gt;kindest/node:v1.37.0&lt;/code&gt;. The durations below&lt;br&gt;
come from the log's timestamps or are what &lt;code&gt;check&lt;/code&gt; printed, in whole&lt;br&gt;
seconds.&lt;/p&gt;

&lt;p&gt;Verifying the index, the recipe and the generator and pulling them took&lt;br&gt;
12 seconds. All compiles, the changed image and the refused&lt;br&gt;
&lt;code&gt;security_profile&lt;/code&gt; included, were done 29 seconds after &lt;code&gt;check&lt;/code&gt; started.&lt;br&gt;
kind had the cluster ready 37 seconds later. The database, then Miniflux,&lt;br&gt;
were rolled out 23 seconds after the first &lt;code&gt;kubectl apply&lt;/code&gt;. Under Compose,&lt;br&gt;
the step from &lt;code&gt;kapitan refs --reveal&lt;/code&gt; to a running Miniflux took 18&lt;br&gt;
seconds, image pulls included. The end of the log, without Compose's pull&lt;br&gt;
progress:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;deployed to kind &lt;span class="k"&gt;in&lt;/span&gt; 23s
EX-30: Miniflux 2.3.4 on kind answers /healthcheck, stored and listed category 2
Docker Compose version v5.7.0
started with docker compose &lt;span class="k"&gt;in&lt;/span&gt; 18s
miniflux miniflux/miniflux:2.3.4@sha256:72e49f513a63104506aab98ba8cfc3a409d4fde23550a583dec07ec941f1e94e Up Less than a second
miniflux-db postgres:18.6@sha256:edb0c08dc33befd0262ab3b5cf1c4f3f8cfd8b09e88c05b45adee29d6761ddb6 Up 11 seconds &lt;span class="o"&gt;(&lt;/span&gt;healthy&lt;span class="o"&gt;)&lt;/span&gt;
EX-30: Miniflux 2.3.4 on compose answers /healthcheck, stored and listed category 2
compose-kubernetes: passed &lt;span class="k"&gt;in&lt;/span&gt; 111s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On both runtimes the new category got the ID 2. Miniflux creates the&lt;br&gt;
category &lt;code&gt;All&lt;/code&gt; for a new user, and each runtime started with an empty&lt;br&gt;
database.&lt;/p&gt;
&lt;h2&gt;
  
  
  How much of Miniflux's Compose file comes back {#round-trip}
&lt;/h2&gt;

&lt;p&gt;The recipe was migrated from&lt;br&gt;
&lt;a href="https://github.com/miniflux/v2/blob/238c5614e584ebc87894e7d9f10bc91373a0b2c2/contrib/docker-compose/basic.yml" rel="noopener noreferrer"&gt;&lt;code&gt;contrib/docker-compose/basic.yml&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
of Miniflux 2.3.4. Compiled back, the file differs in these places:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Miniflux's file&lt;/th&gt;
&lt;th&gt;Target &lt;code&gt;compose&lt;/code&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;service &lt;code&gt;db&lt;/code&gt;, &lt;code&gt;container_name: postgres&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;service &lt;code&gt;miniflux-db&lt;/code&gt;, container named by Compose; the recipe renames the service and drops &lt;code&gt;container_name&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;miniflux/miniflux:latest&lt;/code&gt;, &lt;code&gt;postgres:latest&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;2.3.4&lt;/code&gt; and &lt;code&gt;18.6&lt;/code&gt;, both pinned by digest in the recipe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;passwords &lt;code&gt;secret&lt;/code&gt; and &lt;code&gt;test123&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;refs with random values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ports: ["80:8080"]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;127.0.0.1:8080:8080&lt;/code&gt;, from the target&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;restart: always&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;restart: unless-stopped&lt;/code&gt;, from the target&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;health check every 10s with &lt;code&gt;start_period: 30s&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;every 10s with a timeout of 30s and 3 retries; the recipe drops &lt;code&gt;start_period&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;depends_on&lt;/code&gt; with &lt;code&gt;condition: service_healthy&lt;/code&gt; comes back from the target.&lt;br&gt;
The environment of both services and the volume come back from the&lt;br&gt;
recipe's components with the same names, and with the same values apart&lt;br&gt;
from the passwords and the host name &lt;code&gt;miniflux-db&lt;/code&gt; in &lt;code&gt;DATABASE_URL&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What does not map {#gaps}
&lt;/h2&gt;

&lt;p&gt;Some of what the cluster gets has no counterpart on a Docker host. Apart&lt;br&gt;
from the refusal of &lt;code&gt;security_profile&lt;/code&gt;, &lt;code&gt;check&lt;/code&gt; does not test these&lt;br&gt;
differences.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Service {#service}
&lt;/h3&gt;

&lt;p&gt;On kind, the Service &lt;code&gt;miniflux&lt;/code&gt; listens on port 80 and forwards to the&lt;br&gt;
container's 8080. Compose has no Service. Services reach each other by&lt;br&gt;
service name on the container port, as&lt;br&gt;
&lt;a href="https://docs.docker.com/compose/how-tos/networking/" rel="noopener noreferrer"&gt;Docker's documentation&lt;/a&gt;&lt;br&gt;
describes. &lt;code&gt;DATABASE_URL&lt;/code&gt; names the host &lt;code&gt;miniflux-db&lt;/code&gt; and no port, so the&lt;br&gt;
same URL works on both runtimes. A client of Miniflux uses port 80 in the&lt;br&gt;
cluster and 8080 on the Docker host.&lt;/p&gt;
&lt;h3&gt;
  
  
  Probes {#probes}
&lt;/h3&gt;

&lt;p&gt;The component turns the readiness probe of &lt;code&gt;miniflux-db&lt;/code&gt; into a Compose&lt;br&gt;
health check with the same command. On Kubernetes the probe decides&lt;br&gt;
whether the pod gets traffic through the Service. Under Compose the status&lt;br&gt;
feeds &lt;code&gt;depends_on&lt;/code&gt; and &lt;code&gt;docker compose ps&lt;/code&gt;. A liveness probe restarts a&lt;br&gt;
container that still runs, while Docker's restart policies act on a&lt;br&gt;
container that stops&lt;br&gt;
(&lt;a href="https://docs.docker.com/engine/containers/start-containers-automatically/" rel="noopener noreferrer"&gt;Docker's documentation&lt;/a&gt;).&lt;br&gt;
A Docker health check runs inside the container, so HTTP, TCP and gRPC&lt;br&gt;
probes, which the kubelet runs from outside, need a client in the image.&lt;br&gt;
The component refuses liveness and startup probes and those probe types.&lt;br&gt;
The HTTP probe that the target &lt;code&gt;cluster&lt;/code&gt; adds for Miniflux is one of them.&lt;/p&gt;
&lt;h3&gt;
  
  
  Pod Security {#pod-security}
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;security_profile&lt;/code&gt; fills the fields of a Pod Security level in a pod. In&lt;br&gt;
the shared class it fails the compile of &lt;code&gt;compose&lt;/code&gt;. &lt;code&gt;check&lt;/code&gt; adds it to a&lt;br&gt;
copy of the class and requires that failure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EX-30b: the target compose refuses security_profile in the shared class: components.miniflux: no Compose mapping for ['security_profile']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compose has fields for some of the same settings, such as &lt;code&gt;user&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;cap_drop&lt;/code&gt; and &lt;code&gt;security_opt: [no-new-privileges:true]&lt;/code&gt;. Nothing on a&lt;br&gt;
Docker host refuses a container by level, as the Namespace's label&lt;br&gt;
&lt;code&gt;pod-security.kubernetes.io/enforce: baseline&lt;/code&gt; does in the cluster. A key&lt;br&gt;
that only one runtime has a use for belongs in that runtime's target.&lt;/p&gt;
&lt;h3&gt;
  
  
  NetworkPolicy {#networkpolicy}
&lt;/h3&gt;

&lt;p&gt;The recipe renders none. On Compose, every service on the project's&lt;br&gt;
network reaches every port of the others. Separate networks keep services&lt;br&gt;
apart, but have no port rules.&lt;/p&gt;
&lt;h3&gt;
  
  
  Secrets {#secrets}
&lt;/h3&gt;

&lt;p&gt;On Kubernetes the passwords sit in Secrets, and the pods' environment&lt;br&gt;
refers to them. Compose's &lt;code&gt;secrets&lt;/code&gt; are files mounted into the container,&lt;br&gt;
and no environment variable can refer to one. The component writes the&lt;br&gt;
value into &lt;code&gt;environment&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Volume size {#volume-size}
&lt;/h3&gt;

&lt;p&gt;The volume claim asks for 1Gi. A named volume of Docker's &lt;code&gt;local&lt;/code&gt; driver,&lt;br&gt;
as here, has no size limit.&lt;/p&gt;
&lt;h2&gt;
  
  
  Running it
&lt;/h2&gt;

&lt;p&gt;You need kind, kubectl, oras, uv, jq, curl, Docker with the compose&lt;br&gt;
plugin, and &lt;code&gt;gh&lt;/code&gt; logged in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ git clone https://github.com/kadet-hub/examples
$ &lt;span class="nb"&gt;cd&lt;/span&gt; examples/compose-kubernetes
$ ./check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; verifies the recipe and the kubernetes generator against&lt;br&gt;
kadet-hub's signed &lt;a href="https://kadet-hub.org/glossary/#index" rel="noopener noreferrer"&gt;index&lt;/a&gt; and their&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#attestation" rel="noopener noreferrer"&gt;attestations&lt;/a&gt; before it pulls them by digest, and&lt;br&gt;
does not use &lt;code&gt;kapitan compile --fetch&lt;/code&gt;. The&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/pihole-powerdns-kubernetes/#verify-then-pull-by-digest" rel="noopener noreferrer"&gt;Pi-hole post&lt;/a&gt;&lt;br&gt;
shows the commands.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/docker-compose-kubernetes/" 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>
    <item>
      <title>Talos homelab: machine configs and apps compiled together</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Sun, 22 Nov 2026 13:33:41 +0000</pubDate>
      <link>https://dev.to/kadet-hub/talos-homelab-machine-configs-and-apps-compiled-together-5dbk</link>
      <guid>https://dev.to/kadet-hub/talos-homelab-machine-configs-and-apps-compiled-together-5dbk</guid>
      <description>&lt;p&gt;A Talos cluster and the apps on it share values. The machine configs give&lt;br&gt;
the nodes their addresses and Kubernetes its pod and Service networks.&lt;br&gt;
Manifests that name those networks, such as a NetworkPolicy, only work&lt;br&gt;
while they match. Kept in two places, one of them falls behind the day a&lt;br&gt;
network changes.&lt;/p&gt;

&lt;p&gt;This post renders both layers from one &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt;. The &lt;a href="https://kadet-hub.org/generators/talos/" rel="noopener noreferrer"&gt;talos&lt;/a&gt;&lt;br&gt;
generator writes the machine configs of a control plane node and a worker.&lt;br&gt;
The &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kadet-hub.org/recipes/blackbox-exporter/" rel="noopener noreferrer"&gt;blackbox-exporter&lt;/a&gt; and the&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator render the app, a&lt;br&gt;
Prometheus blackbox exporter with an egress policy. The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/talos-apps" rel="noopener noreferrer"&gt;talos-apps&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script runs in CI on every change and&lt;br&gt;
once a week. It validates the configs, shows that one changed value&lt;br&gt;
changes both layers, boots the configs as Talos containers in Docker and&lt;br&gt;
tests the policy on that cluster.&lt;/p&gt;

&lt;p&gt;The generator itself, &lt;code&gt;talosctl gen config&lt;/code&gt; and config patches are the&lt;br&gt;
subject of the guide&lt;br&gt;
&lt;a href="https://kadet-hub.org/guides/talos-machine-config/" rel="noopener noreferrer"&gt;Talos machine config from a Kapitan inventory&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The values both layers read
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;target&lt;/a&gt; lists &lt;a href="https://kadet-hub.org/glossary/#class" rel="noopener noreferrer"&gt;classes&lt;/a&gt;, and&lt;br&gt;
Kapitan merges their parameters before a generator renders them. The&lt;br&gt;
project has two targets, &lt;code&gt;talos&lt;/code&gt; and &lt;code&gt;blackbox-exporter&lt;/code&gt;, and both include&lt;br&gt;
the class &lt;code&gt;cluster&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# inventory/classes/cluster.yml
&lt;/span&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;nodes_cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;192.0.2.0/24&lt;/span&gt;
    &lt;span class="na"&gt;pod_cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10.244.0.0/16&lt;/span&gt;
    &lt;span class="na"&gt;service_cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10.96.0.0/12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pod and Service networks are Talos' defaults. 192.0.2.0/24 is a range&lt;br&gt;
reserved for documentation and stands for the home network. The class&lt;br&gt;
&lt;code&gt;talos.cluster&lt;/code&gt; hands two of the values to Talos with&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#interpolation" rel="noopener noreferrer"&gt;interpolation&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;clusterName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;homelab&lt;/span&gt;
  &lt;span class="na"&gt;controlPlane&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://192.0.2.11:6443&lt;/span&gt;
  &lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;podSubnets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"${cluster.pod_cidr}"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;serviceSubnets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"${cluster.service_cidr}"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;cni&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flannel&lt;/span&gt;
      &lt;span class="na"&gt;flannel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;kubeNetworkPoliciesEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The class &lt;code&gt;talos.nodes&lt;/code&gt; gives &lt;code&gt;cp-1&lt;/code&gt; the address 192.0.2.11 and &lt;code&gt;worker-1&lt;/code&gt;&lt;br&gt;
the address 192.0.2.21, both in &lt;code&gt;nodes_cidr&lt;/code&gt;. &lt;code&gt;kapitan compile&lt;/code&gt; writes&lt;br&gt;
&lt;code&gt;compiled/talos/talos/cp-1.yaml&lt;/code&gt; and &lt;code&gt;worker-1.yaml&lt;/code&gt;. Both carry the&lt;br&gt;
networks in a &lt;code&gt;KubeNetworkConfig&lt;/code&gt; document:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;dnsDomain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;cluster.local&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;KubeNetworkConfig&lt;/span&gt;
&lt;span class="na"&gt;podSubnets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;10.244.0.0/16&lt;/span&gt;
&lt;span class="na"&gt;serviceSubnets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;10.96.0.0/12&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The app and its egress policy
&lt;/h2&gt;

&lt;p&gt;A blackbox exporter probes the target that a request names:&lt;br&gt;
&lt;code&gt;/probe?module=tcp_connect&amp;amp;target=192.0.2.11:6443&lt;/code&gt; makes it open a TCP&lt;br&gt;
connection to the Kubernetes API. That is its job for the sites it should&lt;br&gt;
watch. Anyone who can reach its port can also point it at the API server,&lt;br&gt;
at Talos' API on the nodes or at any pod. The target therefore adds an&lt;br&gt;
egress policy to the recipe's component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;blackbox-exporter-prometheus-blackbox-exporter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;network_policies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;egress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;egress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespaceSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="na"&gt;kubernetes.io/metadata.name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-system&lt;/span&gt;
                &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="na"&gt;k8s-app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-dns&lt;/span&gt;
            &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;protocol:&lt;/span&gt; &lt;span class="s"&gt;UDP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;port:&lt;/span&gt; &lt;span class="mi"&gt;53&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;protocol:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;port:&lt;/span&gt; &lt;span class="mi"&gt;53&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ipBlock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;cidr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0/0&lt;/span&gt;
                  &lt;span class="na"&gt;except&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;${cluster.nodes_cidr}&lt;/span&gt;
                    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;${cluster.pod_cidr}&lt;/span&gt;
                    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;${cluster.service_cidr}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exporter may ask the cluster's DNS and reach every address outside the&lt;br&gt;
three networks. The target also adds the module &lt;code&gt;tcp_connect&lt;/code&gt; to the&lt;br&gt;
recipe's configuration, puts the exporter into a namespace with the Pod&lt;br&gt;
Security level &lt;code&gt;restricted&lt;/code&gt; and sets the seccomp profile that level needs.&lt;br&gt;
The node network is the home network here, so the exporter cannot reach&lt;br&gt;
the other machines in it either. To watch one of them, add an &lt;code&gt;ipBlock&lt;/code&gt;&lt;br&gt;
rule with its address.&lt;/p&gt;
&lt;h2&gt;
  
  
  Talos network policy
&lt;/h2&gt;

&lt;p&gt;Talos installs flannel as its CNI by default. Flannel routes pod traffic&lt;br&gt;
and enforces no NetworkPolicy, so on a default Talos cluster the policy&lt;br&gt;
above is accepted and has no effect. Talos 1.14 can run&lt;br&gt;
&lt;a href="https://github.com/kubernetes-sigs/kube-network-policies" rel="noopener noreferrer"&gt;kube-network-policies&lt;/a&gt;,&lt;br&gt;
the NetworkPolicy implementation of Kubernetes SIG Network, next to&lt;br&gt;
flannel. &lt;code&gt;kubeNetworkPoliciesEnabled: true&lt;/code&gt; in the cluster's flannel&lt;br&gt;
section turns it on, and the generator writes it into the&lt;br&gt;
&lt;code&gt;KubeFlannelCNIConfig&lt;/code&gt; document of the control plane:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1alpha1&lt;/span&gt;
&lt;span class="na"&gt;backendPort&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4789&lt;/span&gt;
&lt;span class="na"&gt;backendType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vxlan&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;KubeFlannelCNIConfig&lt;/span&gt;
&lt;span class="na"&gt;kubeNetworkPoliciesEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the running cluster, Talos 1.14.5 deploys it as a second container,&lt;br&gt;
&lt;code&gt;registry.k8s.io/networking/kube-network-policies:v1.1.2&lt;/code&gt;, in the&lt;br&gt;
DaemonSet &lt;code&gt;kube-flannel&lt;/code&gt;. Cilium and Calico enforce NetworkPolicies on&lt;br&gt;
their own and do not need it.&lt;/p&gt;
&lt;h2&gt;
  
  
  One change, both layers
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; compiles a copy of the inventory with another pod CIDR in&lt;br&gt;
&lt;code&gt;cluster.yml&lt;/code&gt; and fails unless exactly the two machine configs and the&lt;br&gt;
NetworkPolicy change. Both compiles run without &lt;code&gt;--reveal&lt;/code&gt;, so the files&lt;br&gt;
hold ref tokens instead of secrets. The CI run printed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;--- a/compiled/blackbox-exporter/manifests/blackbox-exporter/blackbox-exporter-prometheus-blackbox-exporter-security.yml&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/compiled/blackbox-exporter/manifests/blackbox-exporter/blackbox-exporter-prometheus-blackbox-exporter-security.yml&lt;/span&gt;
&lt;span class="gu"&gt;@@ -24,7 +24,7 @@&lt;/span&gt;
             cidr: 0.0.0.0/0
             except:
               - 192.0.2.0/24
&lt;span class="gd"&gt;-              - 10.244.0.0/16&lt;/span&gt;
&lt;span class="gi"&gt;+              - 10.42.0.0/16&lt;/span&gt;
               - 10.96.0.0/12
   podSelector:
     matchLabels:
&lt;span class="gd"&gt;--- a/compiled/talos/talos/cp-1.yaml&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/compiled/talos/talos/cp-1.yaml&lt;/span&gt;
&lt;span class="gu"&gt;@@ -54,7 +54,7 @@&lt;/span&gt;
 dnsDomain: cluster.local
 kind: KubeNetworkConfig
 podSubnets:
&lt;span class="gd"&gt;-  - 10.244.0.0/16&lt;/span&gt;
&lt;span class="gi"&gt;+  - 10.42.0.0/16&lt;/span&gt;
 serviceSubnets:
   - 10.96.0.0/12
 ---
&lt;span class="gd"&gt;--- a/compiled/talos/talos/worker-1.yaml&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/compiled/talos/talos/worker-1.yaml&lt;/span&gt;
&lt;span class="gu"&gt;@@ -49,7 +49,7 @@&lt;/span&gt;
 dnsDomain: cluster.local
 kind: KubeNetworkConfig
 podSubnets:
&lt;span class="gd"&gt;-  - 10.244.0.0/16&lt;/span&gt;
&lt;span class="gi"&gt;+  - 10.42.0.0/16&lt;/span&gt;
 serviceSubnets:
   - 10.96.0.0/12
 ---
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Secrets
&lt;/h2&gt;

&lt;p&gt;The generator sets no token, CA or key. The class &lt;code&gt;talos.secrets&lt;/code&gt; sets&lt;br&gt;
each of them to a Kapitan &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;ref&lt;/a&gt;, such as&lt;br&gt;
&lt;code&gt;?{base64:talos/machine-ca-crt}&lt;/code&gt;. On every run &lt;code&gt;check&lt;/code&gt; creates a new&lt;br&gt;
bundle with &lt;code&gt;talosctl gen secrets&lt;/code&gt;, writes each value into its ref and&lt;br&gt;
compiles with &lt;code&gt;--reveal&lt;/code&gt;, which &lt;code&gt;talosctl validate&lt;/code&gt; needs. The bundle&lt;br&gt;
stays in a temporary directory, and &lt;code&gt;refs/&lt;/code&gt; and &lt;code&gt;compiled/&lt;/code&gt; are in&lt;br&gt;
&lt;code&gt;.gitignore&lt;/code&gt;. The base64 backend only encodes. A real repository keeps&lt;br&gt;
these refs in an encrypting backend, such as gpg or Vault, and reveals&lt;br&gt;
them only where the configs are applied.&lt;/p&gt;
&lt;h2&gt;
  
  
  Talos in Docker
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;talosctl validate --mode metal&lt;/code&gt; checks a config without a machine.&lt;br&gt;
Booting it shows more. Talos' documentation on&lt;br&gt;
&lt;a href="https://docs.siderolabs.com/talos/v1.14/platform-specific-installations/local-platforms/docker" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;&lt;br&gt;
names CI pipelines and local tests as what Talos in Docker is for, and&lt;br&gt;
describes both &lt;code&gt;talosctl cluster create docker&lt;/code&gt; and running the image by&lt;br&gt;
hand.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;talosctl cluster create docker&lt;/code&gt; 1.14.5 generates its own configs and&lt;br&gt;
takes only patches to them. &lt;code&gt;check&lt;/code&gt; therefore starts one container per&lt;br&gt;
node itself, with the options of talosctl's docker provisioner&lt;br&gt;
(&lt;code&gt;pkg/provision/providers/docker/node.go&lt;/code&gt; at v1.14.5) and the compiled&lt;br&gt;
config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker network create --subnet 192.0.2.0/24 --gateway 192.0.2.1 talosapps-talos-apps
docker run -d --name talosapps-talos-apps-cp-1 --hostname cp-1 \
  --network talosapps-talos-apps --ip 192.0.2.11 \
  --privileged --security-opt &lt;span class="nv"&gt;seccomp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;unconfined --read-only --cpus 2 --memory 2g \
  --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tmpfs,destination=/run --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tmpfs,destination=/system \
  --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;tmpfs,destination=/tmp --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;volume,destination=/var \
  --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;volume,destination=/system/state --mount &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;volume,destination=/opt \
  -e &lt;span class="nv"&gt;PLATFORM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;container -e &lt;span class="nv"&gt;USERDATA&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"$(base64 -w0 compiled/talos/talos/cp-1.yaml)"&lt;/span&gt; \
  ghcr.io/siderolabs/talos:v1.14.5@sha256:2bd72b810f540a75d5b1c8c3739ada000fff9beec18c941790c34b9592f1a8ff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Docker network gets the node network and gateway from the inventory,&lt;br&gt;
and each container its node's address, so the endpoint&lt;br&gt;
&lt;code&gt;https://192.0.2.11:6443&lt;/code&gt; in the configs works unchanged. &lt;code&gt;worker-1&lt;/code&gt;&lt;br&gt;
starts the same way. &lt;code&gt;check&lt;/code&gt; writes a talosconfig from the same secrets&lt;br&gt;
bundle with &lt;code&gt;talosctl gen config --with-secrets --output-types&lt;br&gt;
talosconfig&lt;/code&gt;, runs &lt;code&gt;talosctl bootstrap&lt;/code&gt; against cp-1 and fetches the&lt;br&gt;
kubeconfig with &lt;code&gt;talosctl kubeconfig&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Three details matter in a container:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;talosctl validate --mode container&lt;/code&gt; requires &lt;code&gt;hostDNS&lt;/code&gt; with
&lt;code&gt;forwardKubeDNSToHost&lt;/code&gt;, which &lt;code&gt;talosctl gen config&lt;/code&gt; also writes. The
class &lt;code&gt;talos.cluster&lt;/code&gt; sets it, and the configs pass both modes.&lt;/li&gt;
&lt;li&gt;The configs set no nameserver. In a container Talos takes the one from
the container's &lt;code&gt;resolv.conf&lt;/code&gt;, and a nameserver in the config would
replace it. On hardware, add &lt;code&gt;nameservers&lt;/code&gt; to &lt;code&gt;talos.cluster&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Flannel's bridge needs the kernel module &lt;code&gt;br_netfilter&lt;/code&gt; on the Docker
host. Without it, a pod gets no answer from a Service whose pods run on
the same node. In a local run without the module, both CoreDNS pods ran
on the exporter's node, and its DNS lookups through the Service
&lt;code&gt;kube-dns&lt;/code&gt; timed out. GitHub's runner image does not load it, so the job
runs &lt;code&gt;sudo modprobe br_netfilter&lt;/code&gt; first, as Talos' guide for GitHub
Actions does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Container mode skips the install. Talos runs an install sequence without&lt;br&gt;
phases, so the install disk and the installer image are never used. It&lt;br&gt;
does take &lt;code&gt;eth0&lt;/code&gt;'s address and default route from the config's&lt;br&gt;
&lt;code&gt;LinkConfig&lt;/code&gt;, but Docker gives the container the same address, so the&lt;br&gt;
boot does not show that the link config alone would bring a machine up.&lt;/p&gt;
&lt;h2&gt;
  
  
  What the CI run showed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42006042988" rel="noopener noreferrer"&gt;Run 42006042988&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;1805dd0&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/149" rel="noopener noreferrer"&gt;kadet-hub/examples#149&lt;/a&gt;&lt;br&gt;
on 5 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner. The durations&lt;br&gt;
below come from the log's timestamps or are what &lt;code&gt;check&lt;/code&gt; printed, in&lt;br&gt;
whole seconds.&lt;/p&gt;

&lt;p&gt;Verifying the index, the recipe and both generators and pulling them took&lt;br&gt;
18 seconds. Creating the secrets bundle, writing it to 14 refs, the&lt;br&gt;
compile and &lt;code&gt;talosctl validate&lt;/code&gt; of both configs in both modes took 14&lt;br&gt;
more, and the two compiles for the diff 4. Pulling the Talos image took 4&lt;br&gt;
seconds. Both nodes were Ready 61 seconds after the containers started.&lt;br&gt;
The configs set no Kubernetes version, so Talos 1.14.5 runs its default,&lt;br&gt;
1.37.1. CoreDNS was available 6 seconds later and the exporter 2 seconds&lt;br&gt;
after its apply, image pulls included. The probes took 63 seconds, most of&lt;br&gt;
it waiting for probes that cannot connect. The whole check took 168&lt;br&gt;
seconds, the job 3 minutes and 7 seconds.&lt;/p&gt;

&lt;p&gt;For comparison, &lt;code&gt;talosctl cluster create docker&lt;/code&gt; with one worker took 150&lt;br&gt;
seconds on a workstation with the Talos image already pulled, until it had&lt;br&gt;
checked the cluster's health. That run used the generated configs, not the&lt;br&gt;
inventory's, and was not repeated in CI.&lt;/p&gt;
&lt;h2&gt;
  
  
  What check tests
&lt;/h2&gt;

&lt;p&gt;Once the cluster is up, &lt;code&gt;check&lt;/code&gt; reads the nodes and the Service&lt;br&gt;
&lt;code&gt;kubernetes&lt;/code&gt; and fails unless the node addresses lie in &lt;code&gt;nodes_cidr&lt;/code&gt;, the&lt;br&gt;
node pod CIDRs in &lt;code&gt;pod_cidr&lt;/code&gt; and the Service's address in&lt;br&gt;
&lt;code&gt;service_cidr&lt;/code&gt;. It then deploys the exporter without its policy and&lt;br&gt;
probes four targets through the API server's service proxy, the control&lt;br&gt;
plane endpoint, the Service &lt;code&gt;kubernetes&lt;/code&gt;, a CoreDNS pod's metrics port&lt;br&gt;
and &lt;code&gt;https://github.com/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;probe tcp_connect 192.0.2.11:6443: probe_success 1, 2s
probe tcp_connect 10.96.0.1:443: probe_success 1, 3s
probe tcp_connect 10.244.0.2:9153: probe_success 1, 2s
probe http_2xx https://github.com/: probe_success 1, 2s
probe tcp_connect 192.0.2.11:6443: probe_success 0, 12s
probe tcp_connect 10.96.0.1:443: probe_success 0, 12s
probe tcp_connect 10.244.0.2:9153: probe_success 0, 12s
probe http_2xx https://github.com/: probe_success 1, 3s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;probe_success 1&lt;/code&gt; means the exporter connected, &lt;code&gt;0&lt;/code&gt; that it did not. The&lt;br&gt;
first three targets are the API server on the node network, the same API&lt;br&gt;
server behind its Service address and a pod. After the policy only&lt;br&gt;
github.com answers. A result counts once two probes in a row return it.&lt;br&gt;
The first probe after the apply already failed. The 12 seconds are two&lt;br&gt;
probes that each wait for the module's 5-second timeout, and the pause&lt;br&gt;
between them.&lt;/p&gt;

&lt;p&gt;Last, &lt;code&gt;check&lt;/code&gt; applies the NetworkPolicy from the compile with&lt;br&gt;
&lt;code&gt;10.42.0.0/16&lt;/code&gt; as pod CIDR, which no longer covers the cluster's pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;probe tcp_connect 10.244.0.2:9153: probe_success 1, 2s
probe tcp_connect 192.0.2.11:6443: probe_success 0, 12s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CoreDNS pod answers again. This is the failure the shared class&lt;br&gt;
prevents: a policy written for another pod network looks right and&lt;br&gt;
leaves the pods open.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it leaves out
&lt;/h2&gt;

&lt;p&gt;The configs are validated for metal but booted in containers, so the&lt;br&gt;
install to a disk, the installer image and a physical link are not&lt;br&gt;
tested. The cluster has one control plane node and no VIP. cp-1 keeps its&lt;br&gt;
control plane taint, so the exporter runs on worker-1, and traffic from&lt;br&gt;
the exporter to its own node's address is not tested. The policy is&lt;br&gt;
tested with flannel and kube-network-policies only. The exporter is not&lt;br&gt;
scraped by a Prometheus, and the cluster name and endpoint are values of&lt;br&gt;
the talos classes alone, because nothing in this app reads them.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/talos-homelab-kapitan/" 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>
    <item>
      <title>Kubernetes multiple environments with a diff for every promotion</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Sat, 21 Nov 2026 13:40:45 +0000</pubDate>
      <link>https://dev.to/kadet-hub/kubernetes-multiple-environments-with-a-diff-for-every-promotion-b3o</link>
      <guid>https://dev.to/kadet-hub/kubernetes-multiple-environments-with-a-diff-for-every-promotion-b3o</guid>
      <description>&lt;p&gt;Most teams run the same app more than once: dev for trying things, stage&lt;br&gt;
for rehearsing the release, prod for users. The three should differ in a&lt;br&gt;
few values, such as the hostname or the number of replicas, and in nothing&lt;br&gt;
else. This post builds that with one &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt; for three environments on two clusters.&lt;br&gt;
It shows where each value is set, which environments a change reaches,&lt;br&gt;
and a CI check that fails when prod drifts from stage.&lt;/p&gt;

&lt;p&gt;The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/multi-env" rel="noopener noreferrer"&gt;multi-env&lt;/a&gt; in&lt;br&gt;
kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script compiles the inventory, rolls a&lt;br&gt;
change through the environments in a copy, and deploys all three&lt;br&gt;
environments to two &lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; clusters. CI runs it on every&lt;br&gt;
change and once a week, and every output below comes from it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;The app is &lt;a href="https://kadet-hub.org/recipes/miniflux/" rel="noopener noreferrer"&gt;miniflux&lt;/a&gt;, a feed reader with a PostgreSQL&lt;br&gt;
of its own, from the kadet-hub &lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt; 1.0.0. It runs&lt;br&gt;
miniflux 2.3.4 and PostgreSQL 18.6, rendered by the&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator 1.14.0. dev and stage&lt;br&gt;
share the cluster &lt;code&gt;multienv-a&lt;/code&gt;, prod runs alone on &lt;code&gt;multienv-b&lt;/code&gt;. Each&lt;br&gt;
environment is a &lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;target&lt;/a&gt;, and the targets differ in&lt;br&gt;
these values:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;dev&lt;/th&gt;
&lt;th&gt;stage&lt;/th&gt;
&lt;th&gt;prod&lt;/th&gt;
&lt;th&gt;set in&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;cluster&lt;/td&gt;
&lt;td&gt;multienv-a&lt;/td&gt;
&lt;td&gt;multienv-a&lt;/td&gt;
&lt;td&gt;multienv-b&lt;/td&gt;
&lt;td&gt;cluster class&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;namespace&lt;/td&gt;
&lt;td&gt;miniflux-dev&lt;/td&gt;
&lt;td&gt;miniflux&lt;/td&gt;
&lt;td&gt;miniflux&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;common&lt;/code&gt;, dev's target&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;replicas&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;env class&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;memory limit&lt;/td&gt;
&lt;td&gt;128Mi&lt;/td&gt;
&lt;td&gt;256Mi&lt;/td&gt;
&lt;td&gt;256Mi&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;common&lt;/code&gt;, dev's env class&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;hostname&lt;/td&gt;
&lt;td&gt;news.dev.example.com&lt;/td&gt;
&lt;td&gt;news.stage.example.com&lt;/td&gt;
&lt;td&gt;news.example.com&lt;/td&gt;
&lt;td&gt;env class&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;storage class&lt;/td&gt;
&lt;td&gt;standard&lt;/td&gt;
&lt;td&gt;standard&lt;/td&gt;
&lt;td&gt;local-retain&lt;/td&gt;
&lt;td&gt;cluster class&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The hostnames are under &lt;code&gt;example.com&lt;/code&gt;, which RFC 2606 reserves for&lt;br&gt;
examples. &lt;code&gt;local-retain&lt;/code&gt; stands in for the storage class of a prod&lt;br&gt;
cluster. It keeps a volume when its claim is deleted, where kind's&lt;br&gt;
&lt;code&gt;standard&lt;/code&gt; deletes it.&lt;/p&gt;
&lt;h2&gt;
  
  
  Three classes per target {#classes}
&lt;/h2&gt;

&lt;p&gt;Each target names three &lt;a href="https://kadet-hub.org/glossary/#class" rel="noopener noreferrer"&gt;classes&lt;/a&gt;: &lt;code&gt;common&lt;/code&gt;, then its&lt;br&gt;
environment, then its cluster. Kapitan merges them in that order, so an&lt;br&gt;
environment overrides &lt;code&gt;common&lt;/code&gt;, and a cluster overrides both. The target&lt;br&gt;
&lt;code&gt;prod&lt;/code&gt;, complete:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;common&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;env.prod&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cluster.b&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;prod&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;common&lt;/code&gt; holds what every environment runs. Its values are prod's, so&lt;br&gt;
the env classes for stage and prod have little to say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.miniflux&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:${kapitan.vars.target}/database-password||random:str:32}&lt;/span&gt;
      &lt;span class="na"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{base64:${kapitan.vars.target}/admin-password||random:str:32}&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;100m&lt;/span&gt;
          &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;128Mi&lt;/span&gt;
        &lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;256Mi&lt;/span&gt;
      &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;BASE_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://${hostname}/&lt;/span&gt;
      &lt;span class="c1"&gt;# Not in the recipe. Ready once the HTTP server runs, after the migrations.
&lt;/span&gt;      &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;readiness&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/healthcheck&lt;/span&gt;
    &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;volume_claims&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;miniflux-db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;storageClassName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${cluster.storage_class}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The passwords are &lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;refs&lt;/a&gt; whose path holds the target's&lt;br&gt;
name, so each environment gets its own random password on the first&lt;br&gt;
compile. &lt;code&gt;BASE_URL&lt;/code&gt; and the storage class are built by&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#interpolation" rel="noopener noreferrer"&gt;interpolation&lt;/a&gt; from facts that the env and&lt;br&gt;
cluster classes set. Those classes do not need to know where miniflux&lt;br&gt;
reads them. The readiness probe is not in the recipe, and the&lt;br&gt;
deploy shows why it is needed. &lt;code&gt;inventory/classes/env/stage.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;news.stage.example.com&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;miniflux&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;replicas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;env/dev.yml&lt;/code&gt; also sets smaller resources. A cluster class holds the&lt;br&gt;
cluster's name and storage class, &lt;code&gt;inventory/classes/cluster/b.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;multienv-b&lt;/span&gt;
    &lt;span class="na"&gt;storage_class&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;local-retain&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;dev and stage would both land in the namespace &lt;code&gt;miniflux&lt;/code&gt; on&lt;br&gt;
&lt;code&gt;multienv-a&lt;/code&gt;. That is the one thing the target &lt;code&gt;dev&lt;/code&gt; overrides, next to&lt;br&gt;
its name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;common&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;env.dev&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cluster.a&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# dev shares cluster a with stage.
&lt;/span&gt;  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;miniflux-dev&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One &lt;code&gt;kapitan compile&lt;/code&gt; writes all three targets, into &lt;code&gt;compiled/dev&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;compiled/stage&lt;/code&gt; and &lt;code&gt;compiled/prod&lt;/code&gt;, six files each.&lt;/p&gt;
&lt;h2&gt;
  
  
  A change on its way to prod {#promotion}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;METRICS_COLLECTOR: 1&lt;/code&gt; turns on miniflux's &lt;code&gt;/metrics&lt;/code&gt; endpoint for&lt;br&gt;
Prometheus. &lt;code&gt;check&lt;/code&gt; rolls that setting through the environments in a copy of the&lt;br&gt;
project. After each step it compiles without &lt;code&gt;--reveal&lt;/code&gt; and compares&lt;br&gt;
&lt;code&gt;compiled/&lt;/code&gt; with the step before, using &lt;code&gt;diff -r&lt;/code&gt;. First the setting goes&lt;br&gt;
into &lt;code&gt;env/dev.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;EX-28a: METRICS_COLLECTOR &lt;span class="k"&gt;in&lt;/span&gt; env/dev.yml changes dev
diff -r before/dev/manifests/miniflux-dev/miniflux-deploy.yml work/compiled/dev/manifests/miniflux-dev/miniflux-deploy.yml
45a46,47
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;             - name: METRICS_COLLECTOR
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;               value: &lt;span class="s1"&gt;'1'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only dev's Deployment changed. Promoting it means adding the same two&lt;br&gt;
lines to &lt;code&gt;env/stage.yml&lt;/code&gt;, which changes stage alone, and then to&lt;br&gt;
&lt;code&gt;env/prod.yml&lt;/code&gt;, which changes prod alone. &lt;code&gt;check&lt;/code&gt; fails when a step&lt;br&gt;
changes another target than the one expected.&lt;/p&gt;

&lt;p&gt;Once all three env classes carry the setting, it belongs in &lt;code&gt;common&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; removes it from the env classes and adds it under &lt;code&gt;env&lt;/code&gt; in&lt;br&gt;
&lt;code&gt;common.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;EX-28a: METRICS_COLLECTOR moved from the env classes to common.yml changes no target
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An empty diff shows that the move changed nothing that gets deployed.&lt;br&gt;
That holds for any reshuffle of the inventory: compile before and after,&lt;br&gt;
and &lt;code&gt;diff -r&lt;/code&gt; either prints nothing or the change.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; runs &lt;code&gt;diff -r&lt;/code&gt; because it compiles locally. In a pull request,&lt;br&gt;
the registry's&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/registry/blob/main/docs/consumers.md#compile-diff-in-pull-requests" rel="noopener noreferrer"&gt;compile-diff actions&lt;/a&gt;&lt;br&gt;
compile the base and the merge commit and post the difference per target&lt;br&gt;
as a comment. This example does not use them.&lt;/p&gt;
&lt;h2&gt;
  
  
  The guard {#guard}
&lt;/h2&gt;

&lt;p&gt;Stage is only worth its cost if it runs what prod will run. The values&lt;br&gt;
that may differ between the two are known in advance: replicas follow the&lt;br&gt;
load, the hostname follows the environment, the storage class follows the&lt;br&gt;
cluster. Everything else differing is a mistake, or a promotion that&lt;br&gt;
stopped halfway.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;guard&lt;/code&gt; is a Python script of 85 lines that checks this on compiled&lt;br&gt;
output. It reads every object of two directories, matches them by kind&lt;br&gt;
and name, and compares them field by field. Every field that differs&lt;br&gt;
must appear in &lt;code&gt;guard-allowed.txt&lt;/code&gt;, which here lists three:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deployment/miniflux spec.replicas
Deployment/miniflux spec.template.spec.containers[miniflux].env[BASE_URL].value
StatefulSet/miniflux-db spec.volumeClaimTemplates[miniflux-db].spec.storageClassName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A list item is addressed by its name when the names in its list are&lt;br&gt;
unique, so reordered environment variables do not count as a change. Ref tokens count as equal, since every target has refs of&lt;br&gt;
its own. On the compiled output of stage and prod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;allowed: Deployment/miniflux spec.replicas: 2 &lt;span class="k"&gt;in&lt;/span&gt; stage, 3 &lt;span class="k"&gt;in&lt;/span&gt; prod
allowed: Deployment/miniflux spec.template.spec.containers&lt;span class="o"&gt;[&lt;/span&gt;miniflux&lt;span class="o"&gt;]&lt;/span&gt;.env&lt;span class="o"&gt;[&lt;/span&gt;BASE_URL&lt;span class="o"&gt;]&lt;/span&gt;.value: https://news.stage.example.com/ &lt;span class="k"&gt;in&lt;/span&gt; stage, https://news.example.com/ &lt;span class="k"&gt;in&lt;/span&gt; prod
allowed: StatefulSet/miniflux-db spec.volumeClaimTemplates&lt;span class="o"&gt;[&lt;/span&gt;miniflux-db&lt;span class="o"&gt;]&lt;/span&gt;.spec.storageClassName: standard &lt;span class="k"&gt;in&lt;/span&gt; stage, local-retain &lt;span class="k"&gt;in&lt;/span&gt; prod
guard: prod differs from stage &lt;span class="k"&gt;in&lt;/span&gt; 3 allowed field&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the promotion step that adds the metrics setting to stage alone,&lt;br&gt;
the guard exits 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;NOT ALLOWED: Deployment/miniflux spec.template.spec.containers&lt;span class="o"&gt;[&lt;/span&gt;miniflux&lt;span class="o"&gt;]&lt;/span&gt;.env&lt;span class="o"&gt;[&lt;/span&gt;METRICS_COLLECTOR&lt;span class="o"&gt;]&lt;/span&gt;.name: METRICS_COLLECTOR &lt;span class="k"&gt;in&lt;/span&gt; stage, &lt;span class="o"&gt;(&lt;/span&gt;absent&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; prod
NOT ALLOWED: Deployment/miniflux spec.template.spec.containers&lt;span class="o"&gt;[&lt;/span&gt;miniflux&lt;span class="o"&gt;]&lt;/span&gt;.env&lt;span class="o"&gt;[&lt;/span&gt;METRICS_COLLECTOR&lt;span class="o"&gt;]&lt;/span&gt;.value: 1 &lt;span class="k"&gt;in&lt;/span&gt; stage, &lt;span class="o"&gt;(&lt;/span&gt;absent&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; prod
guard: prod differs from stage &lt;span class="k"&gt;in&lt;/span&gt; 2 field&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; outside guard-allowed.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the step for &lt;code&gt;env/prod.yml&lt;/code&gt; it passes again. In CI the guard runs&lt;br&gt;
after &lt;code&gt;kapitan compile&lt;/code&gt;, on the compiled output without &lt;code&gt;--reveal&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 guard compiled/stage compiled/prod guard-allowed.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The guard makes a decision visible that otherwise stays implicit: stage&lt;br&gt;
cannot run ahead of prod in Git. A change to stage outside the allowed&lt;br&gt;
fields reaches prod in the same commit, and the deploy pipeline decides&lt;br&gt;
which of the two gets it first. A team that wants stage ahead for a&lt;br&gt;
while adds the field to &lt;code&gt;guard-allowed.txt&lt;/code&gt;, and that line shows up in&lt;br&gt;
review.&lt;/p&gt;
&lt;h2&gt;
  
  
  On two clusters {#deploy}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; creates the kind clusters &lt;code&gt;multienv-a&lt;/code&gt; and &lt;code&gt;multienv-b&lt;/code&gt; and&lt;br&gt;
deploys each target to the cluster and namespace that its inventory&lt;br&gt;
names. It reads them with &lt;code&gt;kapitan inventory --flat&lt;/code&gt;, which prints lines&lt;br&gt;
such as &lt;code&gt;prod.parameters.cluster.name: multienv-b&lt;/code&gt;. It applies PostgreSQL&lt;br&gt;
first and waits for it, because miniflux exits while it cannot connect.&lt;br&gt;
Then it checks what each environment runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;EX-28: dev on multienv-a &lt;span class="k"&gt;in&lt;/span&gt; namespace miniflux-dev: ready replicas 1, memory.max 134217728 &lt;span class="o"&gt;(&lt;/span&gt;128Mi&lt;span class="o"&gt;)&lt;/span&gt;, API endpoint https://news.dev.example.com/, database claim on standard with reclaim policy Delete
EX-28: stage on multienv-a &lt;span class="k"&gt;in&lt;/span&gt; namespace miniflux: ready replicas 2, memory.max 268435456 &lt;span class="o"&gt;(&lt;/span&gt;256Mi&lt;span class="o"&gt;)&lt;/span&gt;, API endpoint https://news.stage.example.com/, database claim on standard with reclaim policy Delete
EX-28: prod on multienv-b &lt;span class="k"&gt;in&lt;/span&gt; namespace miniflux: ready replicas 3, memory.max 268435456 &lt;span class="o"&gt;(&lt;/span&gt;256Mi&lt;span class="o"&gt;)&lt;/span&gt;, API endpoint https://news.example.com/, database claim on local-retain with reclaim policy Retain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The memory limit is read from &lt;code&gt;memory.max&lt;/code&gt; in the cgroup of every miniflux&lt;br&gt;
container, which is the limit the kernel enforces. The hostname comes from&lt;br&gt;
miniflux itself. &lt;code&gt;check&lt;/code&gt; logs in as the admin and reads the Google Reader&lt;br&gt;
API endpoint from the page &lt;code&gt;/integrations&lt;/code&gt;, which miniflux builds from&lt;br&gt;
&lt;code&gt;BASE_URL&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;At the end &lt;code&gt;check&lt;/code&gt; lists how often each miniflux pod restarted. In the&lt;br&gt;
CI run quoted here, one pod of stage restarted once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;  multienv-a miniflux-dev/miniflux-556ccb568f-nt2w2: restart count 0
  multienv-a miniflux/miniflux-55f7b95f65-8nhzr: restart count 0
  multienv-a miniflux/miniflux-55f7b95f65-jwqx4: restart count 1
  multienv-b miniflux/miniflux-bc86d6b65-2dgr4: restart count 0
  multienv-b miniflux/miniflux-bc86d6b65-xdcn2: restart count 0
  multienv-b miniflux/miniflux-bc86d6b65-z5jms: restart count 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In three local runs and three CI runs, at most one pod of stage and one&lt;br&gt;
of prod restarted, at most twice.&lt;/p&gt;

&lt;p&gt;miniflux 2.3.4 runs its database migrations without a lock. When two or&lt;br&gt;
three replicas start on an empty database, one of them can fail with an&lt;br&gt;
error such as &lt;code&gt;pq: column "karakeep_tags" of relation "integrations"&lt;br&gt;
already exists&lt;/code&gt;. It exits, and the kubelet starts it again on the&lt;br&gt;
migrated schema, sometimes after a second collision. dev runs one&lt;br&gt;
replica, so it cannot race. Stage with two replicas runs into the race&lt;br&gt;
that prod's three can, which a stage with one replica would not show.&lt;/p&gt;

&lt;p&gt;Without a readiness probe, a pod counts as ready as soon as its container&lt;br&gt;
runs. In one CI run before &lt;code&gt;common&lt;/code&gt; had the probe, &lt;code&gt;kubectl rollout&lt;br&gt;
status&lt;/code&gt; returned while a pod was still migrating, that pod then lost the&lt;br&gt;
race, and &lt;code&gt;check&lt;/code&gt; found 2 of prod's 3 replicas ready. miniflux answers&lt;br&gt;
&lt;code&gt;/healthcheck&lt;/code&gt; once its HTTP server runs, which is after the migrations.&lt;br&gt;
With the probe on it, &lt;code&gt;rollout status&lt;/code&gt; waits through the restarts.&lt;/p&gt;
&lt;h2&gt;
  
  
  Helm values files and Kustomize overlays {#helm-kustomize}
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://kadet-hub.org/guides/same-app/" rel="noopener noreferrer"&gt;Helm vs Kustomize vs Kapitan&lt;/a&gt;&lt;br&gt;
builds dev and prod of the same app with all three tools and compares&lt;br&gt;
the output. &lt;a href="https://kadet-hub.org/blog/helmfile-vs-kapitan/#environments" rel="noopener noreferrer"&gt;Helmfile vs Kapitan&lt;/a&gt;&lt;br&gt;
does the same for environment files. Only what changes with a third&lt;br&gt;
environment and a second cluster is added here.&lt;/p&gt;

&lt;p&gt;Helm takes &lt;code&gt;--values&lt;/code&gt; more than once, and the last file wins, as &lt;code&gt;helm&lt;br&gt;
template --help&lt;/code&gt; states. &lt;code&gt;helm template -f common.yaml -f stage.yaml -f&lt;br&gt;
cluster-a.yaml&lt;/code&gt; layers values like the three classes do. The order is in&lt;br&gt;
the command line, not in the values files, and each environment is a&lt;br&gt;
separate &lt;code&gt;helm template&lt;/code&gt; run.&lt;/p&gt;

&lt;p&gt;Kustomize builds an overlay on a base, and an overlay can be the base of&lt;br&gt;
another one.&lt;br&gt;
&lt;a href="https://github.com/kubernetes-sigs/kustomize/blob/kustomize/v5.8.1/examples/components.md" rel="noopener noreferrer"&gt;Components&lt;/a&gt;,&lt;br&gt;
&lt;code&gt;kind: Component&lt;/code&gt;, add a block such as a cluster's settings to several&lt;br&gt;
overlays. An overlay per environment, with a component per cluster,&lt;br&gt;
covers this setup. Kustomize has no parameters, so a value built from&lt;br&gt;
another one, such as &lt;code&gt;BASE_URL&lt;/code&gt; from the hostname, is written out in each&lt;br&gt;
overlay or copied with &lt;code&gt;replacements&lt;/code&gt;, as the same-app guide shows.&lt;/p&gt;

&lt;p&gt;None of the three tools compares environments. A check like the guard&lt;br&gt;
needs each environment's rendered objects in a directory of its own.&lt;br&gt;
Kapitan writes that layout with every compile. With Helm or Kustomize,&lt;br&gt;
the pipeline renders each environment first, which this example does not&lt;br&gt;
test.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it does not show
&lt;/h2&gt;

&lt;p&gt;The hostnames reach miniflux and nothing else. kind runs no Ingress or&lt;br&gt;
Gateway controller, so no request arrives by hostname. &lt;code&gt;local-retain&lt;/code&gt; is&lt;br&gt;
checked on the volume, but no claim is deleted to see the volume stay.&lt;br&gt;
The metrics setting is compiled and never deployed. The deploys are&lt;br&gt;
&lt;code&gt;kubectl apply&lt;/code&gt;. An Argo CD Application per target, with its destination&lt;br&gt;
from the cluster class, is what a GitOps setup would add.&lt;/p&gt;
&lt;h2&gt;
  
  
  Running it
&lt;/h2&gt;

&lt;p&gt;You need kind, kubectl, oras, uv, jq, curl, Docker, and &lt;code&gt;gh&lt;/code&gt; logged in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ git clone https://github.com/kadet-hub/examples
$ &lt;span class="nb"&gt;cd&lt;/span&gt; examples/multi-env
$ ./check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; verifies the recipe and the generator against kadet-hub's signed&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#index" rel="noopener noreferrer"&gt;index&lt;/a&gt; and their &lt;a href="https://kadet-hub.org/glossary/#attestation" rel="noopener noreferrer"&gt;attestations&lt;/a&gt;&lt;br&gt;
before it pulls them by &lt;a href="https://kadet-hub.org/glossary/#digest" rel="noopener noreferrer"&gt;digest&lt;/a&gt;, and does not use&lt;br&gt;
&lt;code&gt;kapitan compile --fetch&lt;/code&gt;. The&lt;br&gt;
&lt;a href="https://kadet-hub.org/guides/supply-chain-security-for-kapitan-generators/" rel="noopener noreferrer"&gt;supply-chain guide&lt;/a&gt;&lt;br&gt;
explains why.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/kapitan-multiple-environments/" 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>
    <item>
      <title>Kyverno CLI and conftest in CI vs Kyverno at admission</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Fri, 20 Nov 2026 23:19:48 +0000</pubDate>
      <link>https://dev.to/kadet-hub/kyverno-cli-and-conftest-in-ci-vs-kyverno-at-admission-3ag9</link>
      <guid>https://dev.to/kadet-hub/kyverno-cli-and-conftest-in-ci-vs-kyverno-at-admission-3ag9</guid>
      <description>&lt;p&gt;&lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt; compiles an &lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt;&lt;br&gt;
into plain YAML under &lt;code&gt;compiled/&lt;/code&gt;. The registry's compile diff action shows&lt;br&gt;
a reviewer what a pull request changes in that YAML. It does not say&lt;br&gt;
whether the change is allowed. A container that runs privileged or an&lt;br&gt;
image on the tag &lt;code&gt;latest&lt;/code&gt; is one line in the diff, and Kapitan compiles it&lt;br&gt;
without an error. Kyverno as an admission controller can reject such an&lt;br&gt;
object when it reaches the cluster, after the merge.&lt;/p&gt;

&lt;p&gt;This post runs two policy tools on &lt;code&gt;compiled/&lt;/code&gt; in the pull request: the&lt;br&gt;
Kyverno CLI with policies from&lt;br&gt;
&lt;a href="https://github.com/kyverno/policies" rel="noopener noreferrer"&gt;kyverno/policies&lt;/a&gt;, and conftest with&lt;br&gt;
Rego rules of your own. It then installs Kyverno into a&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster with the same policies and sends it the&lt;br&gt;
same objects.&lt;/p&gt;

&lt;p&gt;The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/policy-checks" rel="noopener noreferrer"&gt;policy-checks&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script runs the steps below on every&lt;br&gt;
change and once a week, and fails when one of their results changes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Two targets
&lt;/h2&gt;

&lt;p&gt;The class &lt;code&gt;web&lt;/code&gt; renders podinfo as a Deployment with a Service through&lt;br&gt;
the &lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator. Two&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#target" rel="noopener noreferrer"&gt;targets&lt;/a&gt; add what the policies look at. &lt;code&gt;compliant&lt;/code&gt;&lt;br&gt;
does what the policies ask for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;compliant&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;compliant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="na"&gt;manifest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;default_config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;security_profile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;restricted&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;web&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/stefanprodan/podinfo:6.17.0@sha256:fa2f27c1a8561097e5144bfc0853eba6054d743b68b03de4cad4675616ddefb0&lt;/span&gt;
      &lt;span class="na"&gt;security_context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;runAsUser:&lt;/span&gt; &lt;span class="mi"&gt;65534&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;cpu:&lt;/span&gt; &lt;span class="s"&gt;50m&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;memory:&lt;/span&gt; &lt;span class="s"&gt;64Mi&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;memory:&lt;/span&gt; &lt;span class="s"&gt;128Mi&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;pdb_min_available&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;noncompliant&lt;/code&gt; does not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;noncompliant&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;namespaces&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;noncompliant&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;web&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/stefanprodan/podinfo:latest&lt;/span&gt;
      &lt;span class="na"&gt;security_context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;privileged:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both have two replicas. &lt;code&gt;security_profile: restricted&lt;/code&gt; makes the generator&lt;br&gt;
fill the fields of the Pod Security Standards' restricted profile that the&lt;br&gt;
inventory leaves unset: &lt;code&gt;runAsNonRoot&lt;/code&gt;, the &lt;code&gt;RuntimeDefault&lt;/code&gt; seccomp&lt;br&gt;
profile, &lt;code&gt;allowPrivilegeEscalation: false&lt;/code&gt; and dropping all capabilities.&lt;br&gt;
&lt;code&gt;pdb_min_available&lt;/code&gt; adds a PodDisruptionBudget.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kapitan compile&lt;/code&gt; exits 0 for both targets. For &lt;code&gt;noncompliant&lt;/code&gt; the&lt;br&gt;
generator logs two warnings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: container web image 'ghcr.io/stefanprodan/podinfo:latest' has no pinned tag or digest; imagePullPolicy is IfNotPresent, the generator default, so nodes keep running a stale cached image
web: container web has no resources requests.cpu, requests.memory, limits.memory; requests drive scheduling and a memory limit bounds the impact of a leak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing warns about the privileged container, because the target sets no&lt;br&gt;
security profile. The warnings name the component, not the target.&lt;/p&gt;
&lt;h2&gt;
  
  
  Kyverno CLI on compiled/
&lt;/h2&gt;

&lt;p&gt;kyverno/policies publishes no releases or tags. It keeps a branch per&lt;br&gt;
Kyverno minor version, and &lt;code&gt;check&lt;/code&gt; downloads the repository's archive at&lt;br&gt;
a commit of &lt;code&gt;release-1.19&lt;/code&gt; to match Kyverno 1.19.2. The branch holds each&lt;br&gt;
policy in several forms. &lt;code&gt;best-practices/&lt;/code&gt; and &lt;code&gt;pod-security/&lt;/code&gt; hold&lt;br&gt;
ClusterPolicies, for which the CLI 1.19.2 prints a warning per file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Warning: pol/best-practices/disallow-latest-tag/disallow-latest-tag.yaml: kyverno.io/v1 ClusterPolicy is deprecated and will be removed in a future release; migrate to ValidatingPolicy, MutatingPolicy, GeneratingPolicy or ImageValidatingPolicy (policies.kyverno.io), see https://kyverno.io/docs/guides/migration-to-cel/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; therefore uses the ValidatingPolicy versions, written in CEL:&lt;br&gt;
&lt;code&gt;best-practices-vpol/disallow-latest-tag&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;best-practices-vpol/require-pod-requests-limits&lt;/code&gt;, and every policy under&lt;br&gt;
&lt;code&gt;pod-security-vpol/baseline&lt;/code&gt; and &lt;code&gt;pod-security-vpol/restricted&lt;/code&gt;. The&lt;br&gt;
restricted profile includes baseline, so both directories are needed.&lt;br&gt;
That makes 18 files. They match Pods, and Kyverno derives the same rules&lt;br&gt;
for Deployments, ReplicaSets, StatefulSets, DaemonSets, Jobs and&lt;br&gt;
CronJobs, so the CLI judges a Deployment by its pod template.&lt;/p&gt;

&lt;p&gt;Given the whole output directory, the CLI checks nothing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kyverno apply &lt;span class="s2"&gt;"${policies[@]}"&lt;/span&gt; --resource=compiled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Applying 18 policy rule(s) to 0 resource(s)...

pass: 0, fail: 0, warn: 0, error: 0, skip: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exit code is 0. &lt;code&gt;--resource&lt;/code&gt; reads the files in a directory, not&lt;br&gt;
those in its subdirectories, and Kapitan writes a target's objects to&lt;br&gt;
&lt;code&gt;compiled/&amp;lt;target&amp;gt;/&amp;lt;namespace&amp;gt;/&lt;/code&gt;. Pointed at &lt;code&gt;compiled/&lt;/code&gt;, the CLI checks&lt;br&gt;
nothing and passes. &lt;code&gt;check&lt;/code&gt; names every file instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mapfile -t files &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;find compiled/noncompliant -name &lt;span class="s1"&gt;'*.yml'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
kyverno apply &lt;span class="s2"&gt;"${policies[@]}"&lt;/span&gt; &lt;span class="s2"&gt;"${files[@]/#/--resource=}"&lt;/span&gt; --remove-color
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For &lt;code&gt;compliant&lt;/code&gt; the CLI reports &lt;code&gt;pass: 18, fail: 0&lt;/code&gt; and exits 0. For&lt;br&gt;
&lt;code&gt;noncompliant&lt;/code&gt; it exits 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Applying 18 policy rule(s) to 3 resource(s)...
policy disallow-latest-tag -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  Using a mutable image tag e.g. 'latest' is not allowed.
policy require-requests-limits -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  CPU and memory resource requests and memory limits are required for containers.
policy disallow-privileged-containers -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  Privileged mode is disallowed. All containers must set the securityContext.privileged field to `false` or unset the field.
policy disallow-capabilities-strict -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  Containers must drop `ALL` capabilities.
policy disallow-privilege-escalation -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  Privilege escalation is disallowed.  All containers must set the securityContext.allowPrivilegeEscalation field to `false`.
policy require-run-as-nonroot -&amp;gt; resource noncompliant/Deployment/web failed:
1 -  Running as root is not allowed. Either spec.securityContext.runAsNonRoot  must be set to true, or all containers (spec.containers[*], spec.initContainers[*],  spec.ephemeralContainers[*]) must have securityContext.runAsNonRoot set to true.

pass: 12, fail: 6, warn: 0, error: 0, skip: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every policy file sets &lt;code&gt;validationActions: [Audit]&lt;/code&gt;. In a cluster, Audit&lt;br&gt;
admits the object, as the admission section shows. The CLI counts the&lt;br&gt;
violation as a failure anyway, unless &lt;code&gt;--audit-warn&lt;/code&gt; turns it into a&lt;br&gt;
warning. The same file&lt;br&gt;
blocks a pull request and nothing in a cluster.&lt;/p&gt;

&lt;p&gt;One finding is missing. &lt;code&gt;noncompliant&lt;/code&gt;'s pod sets no seccomp profile, and&lt;br&gt;
the restricted profile of the&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted" rel="noopener noreferrer"&gt;Pod Security Standards&lt;/a&gt;&lt;br&gt;
forbids that: "Both the Unconfined profile and the absence of a profile&lt;br&gt;
are prohibited." The ValidatingPolicy &lt;code&gt;restrict-seccomp-strict&lt;/code&gt; at the&lt;br&gt;
pinned commit reads a missing profile as &lt;code&gt;RuntimeDefault&lt;/code&gt;&lt;br&gt;
(&lt;code&gt;seccompProfile.?type.orValue('RuntimeDefault')&lt;/code&gt;) and passes the pod. The&lt;br&gt;
18 files are therefore not quite the restricted profile. &lt;code&gt;check&lt;/code&gt; fails&lt;br&gt;
once that policy reports the pod, so this paragraph gets updated.&lt;/p&gt;
&lt;h2&gt;
  
  
  conftest with your own rules
&lt;/h2&gt;

&lt;p&gt;The Kyverno policies judge one object at a time. Some rules need two.&lt;br&gt;
&lt;code&gt;policy/compiled.rego&lt;/code&gt; holds two house rules for conftest, which bundles&lt;br&gt;
OPA:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rego"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;

&lt;span class="n"&gt;objects&lt;/span&gt; &lt;span class="n"&gt;contains&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;
    &lt;span class="nf"&gt;is_object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contents&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;objects&lt;/span&gt; &lt;span class="n"&gt;contains&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;
    &lt;span class="nf"&gt;is_array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;contents&lt;/span&gt;
    &lt;span class="nf"&gt;is_object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;deny&lt;/span&gt; &lt;span class="n"&gt;contains&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt;
    &lt;span class="nf"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"containers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"initContainers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ephemeralContainers"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;
    &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@sha256:"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"%s: %s %s, container %s: image %s is not pinned by digest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;deny&lt;/span&gt; &lt;span class="n"&gt;contains&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"Deployment"&lt;/span&gt;
    &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replicas&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;covered&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"%s: Deployment %s runs %d replicas and no PodDisruptionBudget selects its pods"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replicas&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;covered&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pdb&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;objects&lt;/span&gt;
    &lt;span class="n"&gt;pdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"PodDisruptionBudget"&lt;/span&gt;
    &lt;span class="n"&gt;pdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt;
    &lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matchLabels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;every&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pdb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matchLabels&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nf"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"%s/%s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--combine&lt;/code&gt; hands all files of a target to the rules as one list, so the&lt;br&gt;
second rule can look for a PodDisruptionBudget in another file. The&lt;br&gt;
generator writes the Deployment to &lt;code&gt;web-deploy.yml&lt;/code&gt; and the&lt;br&gt;
PodDisruptionBudget to &lt;code&gt;web-scaling.yml&lt;/code&gt;. The first rule finds pod specs&lt;br&gt;
at any depth, so it covers Pods, Deployments, CronJobs and pod templates&lt;br&gt;
inside custom resources alike. Unlike Kyverno's CLI, conftest reads the&lt;br&gt;
subdirectories of the path it is given.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conftest &lt;span class="nb"&gt;test&lt;/span&gt; --combine --no-color compiled/noncompliant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAIL - Combined - main - compiled/noncompliant/noncompliant/web-deploy.yml: Deployment noncompliant/web runs 2 replicas and no PodDisruptionBudget selects its pods
FAIL - Combined - main - compiled/noncompliant/noncompliant/web-deploy.yml: Deployment noncompliant/web, container web: image ghcr.io/stefanprodan/podinfo:latest is not pinned by digest

2 tests, 0 passed, 0 warnings, 2 failures, 0 exceptions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;conftest exits 1 here and 0 for &lt;code&gt;compiled/compliant&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  In the pull request, next to the compile diff
&lt;/h2&gt;

&lt;p&gt;The registry's compile diff runs as two workflows. &lt;code&gt;compile-diff.yml&lt;/code&gt;&lt;br&gt;
compiles the base and the merge commit with the&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/registry/blob/main/docs/consumers.md#compile-diff-in-pull-requests" rel="noopener noreferrer"&gt;consumer workflow&lt;/a&gt;&lt;br&gt;
and uploads the diff. &lt;code&gt;compile-diff-comment.yml&lt;/code&gt; posts it on the pull&lt;br&gt;
request. kadet-hub/examples runs both on &lt;code&gt;first-platform&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The policy checks go into a third workflow, &lt;code&gt;policy.yml&lt;/code&gt;. The comment&lt;br&gt;
action downloads the diff only when the compile diff run succeeded, and&lt;br&gt;
posts a one-line status otherwise. A policy job inside that run would&lt;br&gt;
replace the diff with "failure" exactly when a reviewer needs to see what&lt;br&gt;
changed.&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/blob/main/policy-checks/.github/workflows/policy.yml" rel="noopener noreferrer"&gt;&lt;code&gt;policy.yml&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
in the example folder is the workflow for a repository of your own:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;policy&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# renovate: datasource=github-release-attachments depName=kyverno/kyverno
&lt;/span&gt;  &lt;span class="na"&gt;KYVERNO_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1.19.2&lt;/span&gt;
  &lt;span class="na"&gt;KYVERNO_SHA256&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;357eaf1df8bc24ddd5a73979fadeaae6a032e8710f11af264229756e4956bf4a&lt;/span&gt;
  &lt;span class="c1"&gt;# renovate: datasource=github-release-attachments depName=open-policy-agent/conftest
&lt;/span&gt;  &lt;span class="na"&gt;CONFTEST_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v0.71.1&lt;/span&gt;
  &lt;span class="na"&gt;CONFTEST_SHA256&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;c3f6b2a753bd56e377a1e51a95ae3e057f926f2e9139f7d5b5dfbbaf810f7985&lt;/span&gt;
  &lt;span class="c1"&gt;# The release branch of KYVERNO_VERSION's minor version.
&lt;/span&gt;  &lt;span class="c1"&gt;# renovate: datasource=github-digest depName=kyverno/policies
&lt;/span&gt;  &lt;span class="na"&gt;KYVERNO_POLICIES_COMMIT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;282e77f6d54e1e1a636190ff2dacc3d02c2d689c&lt;/span&gt; &lt;span class="c1"&gt;# release-1.19
&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
      &lt;span class="na"&gt;packages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
      &lt;span class="na"&gt;attestations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
    &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kadet-hub/registry/.github/workflows/consumer.yml@3ce8f3bf31e2bdaf6008b6fb787fd19f1b098470&lt;/span&gt; &lt;span class="c1"&gt;# main
&lt;/span&gt;
  &lt;span class="na"&gt;policy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;needs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;compile&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-24.04&lt;/span&gt;
    &lt;span class="na"&gt;timeout-minutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1&lt;/span&gt; &lt;span class="c1"&gt;# v7.0.1
&lt;/span&gt;        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;persist-credentials&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 class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333&lt;/span&gt; &lt;span class="c1"&gt;# v8.0.2
&lt;/span&gt;        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;compiled&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ runner.temp }}/out&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install the Kyverno CLI and conftest, download the policies&lt;/span&gt;
        &lt;span class="na"&gt;working-directory&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ runner.temp }}&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;curl -fsSLo kyverno.tgz "https://github.com/kyverno/kyverno/releases/download/$KYVERNO_VERSION/kyverno-cli_${KYVERNO_VERSION}_linux_x86_64.tar.gz"&lt;/span&gt;
          &lt;span class="s"&gt;curl -fsSLo conftest.tgz "https://github.com/open-policy-agent/conftest/releases/download/$CONFTEST_VERSION/conftest_${CONFTEST_VERSION#v}_Linux_x86_64.tar.gz"&lt;/span&gt;
          &lt;span class="s"&gt;sha256sum -c &amp;lt;&amp;lt;EOF&lt;/span&gt;
          &lt;span class="s"&gt;$KYVERNO_SHA256  kyverno.tgz&lt;/span&gt;
          &lt;span class="s"&gt;$CONFTEST_SHA256  conftest.tgz&lt;/span&gt;
          &lt;span class="s"&gt;EOF&lt;/span&gt;
          &lt;span class="s"&gt;tar -xzf kyverno.tgz kyverno&lt;/span&gt;
          &lt;span class="s"&gt;tar -xzf conftest.tgz conftest&lt;/span&gt;
          &lt;span class="s"&gt;mkdir policies&lt;/span&gt;
          &lt;span class="s"&gt;curl -fsSL "https://github.com/kyverno/policies/archive/$KYVERNO_POLICIES_COMMIT.tar.gz" |&lt;/span&gt;
            &lt;span class="s"&gt;tar -xzf - -C policies --strip-components=1 --wildcards '*/best-practices-vpol/*' '*/pod-security-vpol/*'&lt;/span&gt;
      &lt;span class="c1"&gt;# --resource reads the files of a directory, not of its subdirectories,
&lt;/span&gt;      &lt;span class="c1"&gt;# so every file of a target is named.
&lt;/span&gt;      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Kyverno&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;p=$RUNNER_TEMP/policies&lt;/span&gt;
          &lt;span class="s"&gt;policies=("$p"/best-practices-vpol/{disallow-latest-tag,require-pod-requests-limits}/*.yaml&lt;/span&gt;
            &lt;span class="s2"&gt;"$p"&lt;/span&gt;&lt;span class="s"&gt;/pod-security-vpol/{baseline,restricted}/*/*.yaml)&lt;/span&gt;
          &lt;span class="s"&gt;status=0&lt;/span&gt;
          &lt;span class="s"&gt;for target in "$RUNNER_TEMP"/out/compiled/*/; do&lt;/span&gt;
            &lt;span class="s"&gt;mapfile -t files &amp;lt; &amp;lt;(find "$target" -name '*.yml' -o -name '*.yaml')&lt;/span&gt;
            &lt;span class="s2"&gt;"$RUNNER_TEMP/kyverno"&lt;/span&gt; &lt;span class="s"&gt;apply "${policies[@]}" "${files[@]/#/--resource=}" --remove-color || status=1&lt;/span&gt;
          &lt;span class="s"&gt;done&lt;/span&gt;
          &lt;span class="s"&gt;exit "$status"&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;conftest&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;status=0&lt;/span&gt;
          &lt;span class="s"&gt;for target in "$RUNNER_TEMP"/out/compiled/*/; do&lt;/span&gt;
            &lt;span class="s2"&gt;"$RUNNER_TEMP/conftest"&lt;/span&gt; &lt;span class="s"&gt;test --combine --no-color "$target" || status=1&lt;/span&gt;
          &lt;span class="s"&gt;done&lt;/span&gt;
          &lt;span class="s"&gt;exit "$status"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;compile&lt;/code&gt; job is the consumer workflow, which compiles in a gVisor&lt;br&gt;
sandbox and uploads &lt;code&gt;compiled/&lt;/code&gt; as the artifact &lt;code&gt;compiled&lt;/code&gt;. The policy job&lt;br&gt;
reads that artifact. It runs no Kapitan and nothing from the project but&lt;br&gt;
the Rego files, and needs only &lt;code&gt;contents: read&lt;/code&gt;. The two last steps&lt;br&gt;
run the commands of the previous sections, one loop over the targets per&lt;br&gt;
tool, and fail when any target fails.&lt;/p&gt;

&lt;p&gt;GitHub does not run this copy in kadet-hub/examples, because a workflow&lt;br&gt;
only runs from the repository root. Its commands are the ones &lt;code&gt;check&lt;/code&gt;&lt;br&gt;
runs, but the workflow itself is not tested. The consumer workflow also&lt;br&gt;
checks the output against rules of its own, and its docs list privileged&lt;br&gt;
containers among them. In such a repository, &lt;code&gt;noncompliant&lt;/code&gt; would fail in&lt;br&gt;
the &lt;code&gt;compile&lt;/code&gt; job, and the policy job would not run. That was not tested&lt;br&gt;
either.&lt;/p&gt;
&lt;h2&gt;
  
  
  The same policies at admission
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; creates a kind cluster with the node image &lt;code&gt;kindest/node:v1.37.0&lt;/code&gt;,&lt;br&gt;
installs Kyverno 1.19.2 from its release manifest &lt;code&gt;install.yaml&lt;/code&gt;, the&lt;br&gt;
version of the CLI, and applies the same 18 files. 17 of them use&lt;br&gt;
&lt;code&gt;policies.kyverno.io/v1alpha1&lt;/code&gt;, and kubectl prints the API server's&lt;br&gt;
warning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Warning: policies.kyverno.io/v1alpha1 ValidatingPolicy is deprecated; use policies.kyverno.io/v1 ValidatingPolicy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With every policy patched to &lt;code&gt;validationActions: [Deny]&lt;/code&gt;, a server-side&lt;br&gt;
dry run of &lt;code&gt;noncompliant&lt;/code&gt;'s Deployment is rejected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Error from server: error when creating "compiled/noncompliant/noncompliant/web-deploy.yml": admission webhook "vpol.validate.kyverno.svc-fail" denied the request: Policy disallow-latest-tag failed: Using a mutable image tag e.g. 'latest' is not allowed.;
Policy disallow-capabilities-strict failed: Containers must drop `ALL` capabilities.;
Policy disallow-privilege-escalation failed: Privilege escalation is disallowed. [...]
Policy require-run-as-nonroot failed: Running as root is not allowed. [...]
Policy require-requests-limits failed: CPU and memory resource requests and memory limits are required for containers.;
Policy disallow-privileged-containers failed: Privileged mode is disallowed. [...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the six policies the CLI reported, with the same messages. The&lt;br&gt;
dry run sends the Deployment through admission without creating it, so&lt;br&gt;
nothing pulls &lt;code&gt;podinfo:latest&lt;/code&gt;. &lt;code&gt;check&lt;/code&gt; then applies the 18 files again as&lt;br&gt;
shipped, which sets them back to Audit, and the same dry run passes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deployment.apps/web created (server dry run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copied into a cluster as they are, the policies block nothing. Under&lt;br&gt;
&lt;code&gt;[Deny]&lt;/code&gt;, &lt;code&gt;compliant&lt;/code&gt; applies and its Deployment rolls out with two&lt;br&gt;
replicas. The last step does not come from &lt;code&gt;compiled/&lt;/code&gt; at all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl -n noncompliant run debug --image=ghcr.io/stefanprodan/podinfo:latest --privileged
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kyverno rejects it, &lt;code&gt;disallow-privileged-containers&lt;/code&gt; among the failed&lt;br&gt;
policies. No CI job sees that request.&lt;/p&gt;

&lt;h2&gt;
  
  
  What each one catches
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Kyverno CLI and conftest in CI&lt;/th&gt;
&lt;th&gt;Kyverno at admission&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;When&lt;/td&gt;
&lt;td&gt;in the pull request, before the merge&lt;/td&gt;
&lt;td&gt;when an object reaches the API server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;What it sees&lt;/td&gt;
&lt;td&gt;every file of a target, conftest all of them at once&lt;/td&gt;
&lt;td&gt;one object per request, from any source&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Objects outside &lt;code&gt;compiled/&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;yes, &lt;code&gt;kubectl run&lt;/code&gt; above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policies in Audit&lt;/td&gt;
&lt;td&gt;fail the job&lt;/td&gt;
&lt;td&gt;admit the object&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Who sees the result&lt;/td&gt;
&lt;td&gt;the reviewer, next to the compile diff&lt;/td&gt;
&lt;td&gt;whoever applied&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;CI shows a violation where the change is reviewed, with the diff of the&lt;br&gt;
lines that cause it, and without access to a cluster. It only sees what&lt;br&gt;
went through &lt;code&gt;compiled/&lt;/code&gt;. Admission sees every request: a &lt;code&gt;kubectl&lt;/code&gt; from a&lt;br&gt;
laptop, another pipeline, an operator that creates pods. It answers after&lt;br&gt;
the merge, and only once the policies are set to Deny. Running both with&lt;br&gt;
the same files keeps one source for the rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the CI run showed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42003985350" rel="noopener noreferrer"&gt;Run 42003985350&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;f638f38&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/148" rel="noopener noreferrer"&gt;kadet-hub/examples#148&lt;/a&gt;&lt;br&gt;
on 5 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner, with the kind node&lt;br&gt;
image &lt;code&gt;kindest/node:v1.37.0&lt;/code&gt;. The durations below come from the log's&lt;br&gt;
timestamps or are what &lt;code&gt;check&lt;/code&gt; printed, in whole seconds.&lt;/p&gt;

&lt;p&gt;Verifying the index and the generator, pulling it, compiling both targets&lt;br&gt;
and running both tools on both took 18 seconds. The three &lt;code&gt;kyverno apply&lt;/code&gt;&lt;br&gt;
runs took 2 seconds of that, the two conftest runs less than one. kind had&lt;br&gt;
the cluster ready 40 seconds later, and Kyverno's Deployments were&lt;br&gt;
available 21 seconds after the apply of &lt;code&gt;install.yaml&lt;/code&gt;. The first denied&lt;br&gt;
dry run came 14 seconds after the policies were applied, a time that&lt;br&gt;
includes waiting for them to report ready and patching all 18. The whole&lt;br&gt;
check took 101 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pins
&lt;/h2&gt;

&lt;p&gt;The workflow installs the Kyverno CLI and conftest by version and sha256,&lt;br&gt;
and &lt;code&gt;check&lt;/code&gt; downloads Kyverno's &lt;code&gt;install.yaml&lt;/code&gt; the same way. &lt;code&gt;check&lt;/code&gt;&lt;br&gt;
compares the CLI's version with &lt;code&gt;install.yaml&lt;/code&gt;'s and fails when they&lt;br&gt;
differ. The policies are pinned by the commit of their branch. Renovate&lt;br&gt;
moves that commit along the branch with its &lt;code&gt;github-digest&lt;/code&gt; datasource, and&lt;br&gt;
never to another branch. When Renovate moves Kyverno to 1.20, &lt;code&gt;check&lt;/code&gt; fails&lt;br&gt;
until someone moves the pin to &lt;code&gt;release-1.20&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is not tested
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The workflow &lt;code&gt;policy.yml&lt;/code&gt; and the consumer workflow's own output rules,
as said above.&lt;/li&gt;
&lt;li&gt;Kyverno's policy reports.&lt;/li&gt;
&lt;li&gt;Kubernetes' built-in Pod Security Admission, which enforces the
restricted profile per namespace without Kyverno.&lt;/li&gt;
&lt;li&gt;conftest's other parsers, and output that is not Kubernetes YAML.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/kyverno-cli-conftest-ci/" 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>
    <item>
      <title>External Secrets Operator with Vault AppRole and Kapitan refs</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:39:27 +0000</pubDate>
      <link>https://dev.to/kadet-hub/external-secrets-operator-with-vault-approle-and-kapitan-refs-4fep</link>
      <guid>https://dev.to/kadet-hub/external-secrets-operator-with-vault-approle-and-kapitan-refs-4fep</guid>
      <description>&lt;p&gt;A &lt;a href="https://kadet-hub.org/glossary/#kapitan" rel="noopener noreferrer"&gt;Kapitan&lt;/a&gt; project can keep every secret as a&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#ref" rel="noopener noreferrer"&gt;ref&lt;/a&gt;, encrypted in Git and revealed at deploy time.&lt;br&gt;
External Secrets Operator takes the other route. It reads a secret&lt;br&gt;
manager such as Vault from inside the cluster and writes Kubernetes&lt;br&gt;
Secrets from it. Most clusters end up with both, and then each secret&lt;br&gt;
needs a place. This post puts one app on both and shows where each of its&lt;br&gt;
secrets goes and why.&lt;/p&gt;

&lt;p&gt;The app is Vaultwarden, from the &lt;a href="https://kadet-hub.org/recipes/vaultwarden/" rel="noopener noreferrer"&gt;vaultwarden&lt;/a&gt;&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#recipe" rel="noopener noreferrer"&gt;recipe&lt;/a&gt; 1.0.0. Its admin token comes from Vault&lt;br&gt;
through External Secrets. External Secrets logs in to Vault with an&lt;br&gt;
AppRole, and the AppRole's secret ID is the one secret the&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#inventory" rel="noopener noreferrer"&gt;inventory&lt;/a&gt; carries, as a gpg ref. The project is&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/tree/main/secrets-end-to-end" rel="noopener noreferrer"&gt;secrets-end-to-end&lt;/a&gt;&lt;br&gt;
in kadet-hub/examples. Its &lt;code&gt;check&lt;/code&gt; script runs it on a new&lt;br&gt;
&lt;a href="https://kadet-hub.org/glossary/#kind" rel="noopener noreferrer"&gt;kind&lt;/a&gt; cluster on every change and once a week, with&lt;br&gt;
External Secrets 2.14.0, Vault 2.2.1 and Kapitan 0.36.3. It writes a new&lt;br&gt;
admin token to Vault and fails unless Vaultwarden takes it after a&lt;br&gt;
restart.&lt;/p&gt;
&lt;h2&gt;
  
  
  Which secret goes where {#split}
&lt;/h2&gt;

&lt;p&gt;A ref changes with a commit. Its ciphertext lives in the repository's&lt;br&gt;
&lt;code&gt;refs/&lt;/code&gt; directory, and a new value reaches the cluster with the next&lt;br&gt;
compile and deploy, which reveal it. A secret in Vault changes without&lt;br&gt;
the repository. External Secrets reads it again every refresh interval&lt;br&gt;
and rewrites the Secret, and nobody compiles or commits.&lt;/p&gt;

&lt;p&gt;So the question for each secret is who changes it and when. A secret&lt;br&gt;
that whoever runs Vault rotates belongs in Vault. A secret that has to&lt;br&gt;
exist before External Secrets can read anything cannot come from&lt;br&gt;
External Secrets, and belongs in a ref. That second kind is the bootstrap&lt;br&gt;
secret, sometimes called secret zero.&lt;/p&gt;

&lt;p&gt;The example has one of each:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;AppRole secret ID&lt;/th&gt;
&lt;th&gt;Vaultwarden admin token&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Kind&lt;/td&gt;
&lt;td&gt;bootstrap&lt;/td&gt;
&lt;td&gt;runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Issued by&lt;/td&gt;
&lt;td&gt;Vault, once&lt;/td&gt;
&lt;td&gt;whoever runs Vault, at every rotation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kept in&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;refs/&lt;/code&gt;, encrypted for a gpg key&lt;/td&gt;
&lt;td&gt;Vault, &lt;code&gt;secret/vaultwarden&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reaches the cluster&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kapitan refs --reveal&lt;/code&gt; in the deploy&lt;/td&gt;
&lt;td&gt;External Secrets, every 10 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A new value needs&lt;/td&gt;
&lt;td&gt;a new ref, a commit and a deploy&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;vault kv put&lt;/code&gt; and a restart of Vaultwarden&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;External Secrets needs the secret ID to log in to Vault, so it cannot&lt;br&gt;
fetch the secret ID from Vault. The admin token, and any secret the app&lt;br&gt;
later keeps in Vault, comes through that login.&lt;/p&gt;
&lt;h2&gt;
  
  
  How External Secrets logs in to Vault {#auth}
&lt;/h2&gt;

&lt;p&gt;External Secrets' Vault provider has several login methods, and they&lt;br&gt;
differ in what the inventory has to carry. Only AppRole is tested here.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Secret in the inventory&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;token&lt;/td&gt;
&lt;td&gt;the Vault token&lt;/td&gt;
&lt;td&gt;Tokens other than root tokens expire with their TTL unless renewed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AppRole&lt;/td&gt;
&lt;td&gt;the secret ID; the role ID is not secret&lt;/td&gt;
&lt;td&gt;Each login returns a token of its own with &lt;code&gt;token_ttl&lt;/code&gt;. The secret ID can be issued without expiry.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kubernetes or JWT auth&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;Vault checks a ServiceAccount token of the pod, through the cluster's TokenReview API or its signing keys.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Kubernetes or JWT auth leaves no secret in the inventory, and the split&lt;br&gt;
reduces to the right column of the first table. In return, Vault has to&lt;br&gt;
reach the cluster's API server or hold its signing keys, which a Vault&lt;br&gt;
that another team runs outside the cluster may not offer. AppRole works&lt;br&gt;
from anywhere that reaches Vault, and its one secret has to get into the&lt;br&gt;
cluster some other way. Here that way is the ref.&lt;/p&gt;
&lt;h2&gt;
  
  
  What a refs backend needs {#backends}
&lt;/h2&gt;

&lt;p&gt;A ref is a tag such as &lt;code&gt;?{gpg:vaultwarden/vault-secret-id}&lt;/code&gt; in the&lt;br&gt;
inventory and a file of the same path under &lt;code&gt;refs/&lt;/code&gt;. Three steps touch&lt;br&gt;
it, and they need different access:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;gpg&lt;/th&gt;
&lt;th&gt;vaultkv, vaulttransit, cloud KMS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kapitan refs --write&lt;/code&gt;, or the first compile of a ref with a function such as `\&lt;/td&gt;
&lt;td&gt;\&lt;/td&gt;
&lt;td&gt;random:str`&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kapitan compile&lt;/code&gt; without &lt;code&gt;--reveal&lt;/code&gt;, for refs that exist&lt;/td&gt;
&lt;td&gt;nothing&lt;/td&gt;
&lt;td&gt;nothing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;kapitan refs --reveal&lt;/code&gt; or &lt;code&gt;kapitan compile --reveal&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;a recipient's private key&lt;/td&gt;
&lt;td&gt;the backend's decrypt or read access&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The middle row is the one that is easy to get wrong. Kapitan reads an&lt;br&gt;
existing ref file and writes its tag with a short hash, so a CI job can&lt;br&gt;
compile a repository with a committed &lt;code&gt;refs/&lt;/code&gt; directory and no&lt;br&gt;
credentials at all. A pull request to Kapitan's docs,&lt;br&gt;
&lt;a href="https://github.com/kapicorp/kapitan/pull/1646" rel="noopener noreferrer"&gt;kapicorp/kapitan#1646&lt;/a&gt;,&lt;br&gt;
adds this to the refs documentation. Its author tested gpg, vaultkv,&lt;br&gt;
vaulttransit, gkms, awskms and azkms. &lt;code&gt;check&lt;/code&gt; tests gpg, with an empty&lt;br&gt;
keyring, as below. The &lt;code&gt;base64&lt;/code&gt; and &lt;code&gt;plain&lt;/code&gt; backends need&lt;br&gt;
nothing at any step and encrypt nothing, so their ref files are as secret&lt;br&gt;
as the values.&lt;/p&gt;
&lt;h2&gt;
  
  
  The target {#target}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;inventory/targets/vaultwarden.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;classes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;recipes.vaultwarden&lt;/span&gt;
&lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
  &lt;span class="na"&gt;kapitan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
    &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;gpg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;recipients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secrets-end-to-end@example.com&lt;/span&gt;
    &lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;oci&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/kadet-hub/external-secrets:1.0.6@sha256:184e8a60f92c0c09eae32973ceaf909b2da53457e88233161ffb90c4b9a63e60&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;lib/external-secrets&lt;/span&gt;
    &lt;span class="na"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="c1"&gt;# The recipe's Secret vaultwarden. External Secrets writes a Secret of
&lt;/span&gt;      &lt;span class="c1"&gt;# that name from Vault.
&lt;/span&gt;      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;input_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;remove&lt;/span&gt;
        &lt;span class="na"&gt;input_paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;compiled/${kapitan.vars.target}/manifests/vaultwarden/vaultwarden-secret.yml&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;input_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kadet&lt;/span&gt;
        &lt;span class="na"&gt;input_paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;lib/external-secrets&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="na"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;manifests/&lt;/span&gt;
        &lt;span class="na"&gt;output_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yml&lt;/span&gt;
  &lt;span class="na"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vaultwarden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://vaultwarden.example.com&lt;/span&gt;
      &lt;span class="c1"&gt;# The recipe requires it. Its Secret is removed above.
&lt;/span&gt;      &lt;span class="na"&gt;admin_token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;from-vault&lt;/span&gt;
  &lt;span class="na"&gt;generators&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kubernetes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;vault-approle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;string_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;secret-id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{gpg:vaultwarden/vault-secret-id}&lt;/span&gt;
    &lt;span class="na"&gt;external_secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;secretstores&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;vault&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;vault&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="na"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://vault.vault.svc.cluster.local:8200&lt;/span&gt;
                &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secret&lt;/span&gt;
                &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v2&lt;/span&gt;
                &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;appRole&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;approle&lt;/span&gt;
                    &lt;span class="na"&gt;roleId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
                    &lt;span class="na"&gt;secretRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault-approle&lt;/span&gt;
                      &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secret-id&lt;/span&gt;
      &lt;span class="na"&gt;externalsecrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;vaultwarden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;store&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault&lt;/span&gt;
          &lt;span class="na"&gt;refresh_interval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
          &lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;secretKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ADMIN_TOKEN&lt;/span&gt;
                &lt;span class="na"&gt;remoteRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                  &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
                  &lt;span class="na"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin_token&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://kadet-hub.org/generators/kubernetes/" rel="noopener noreferrer"&gt;kubernetes&lt;/a&gt; generator, which the recipe&lt;br&gt;
pins, renders the Secret &lt;code&gt;vault-approle&lt;/code&gt; with the ref. The&lt;br&gt;
&lt;a href="https://kadet-hub.org/generators/external-secrets/" rel="noopener noreferrer"&gt;external-secrets&lt;/a&gt; generator renders the&lt;br&gt;
SecretStore &lt;code&gt;vault&lt;/code&gt; and the ExternalSecret &lt;code&gt;vaultwarden&lt;/code&gt;. It renders&lt;br&gt;
External Secrets' custom resources only, so &lt;code&gt;check&lt;/code&gt; installs External&lt;br&gt;
Secrets itself from the project's release manifest, as the&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/kubernetes-cluster-add-ons/" rel="noopener noreferrer"&gt;cluster add-ons post&lt;/a&gt; does.&lt;/p&gt;

&lt;p&gt;The recipe expects its admin token as a ref and renders a Secret&lt;br&gt;
&lt;code&gt;vaultwarden&lt;/code&gt; with the key &lt;code&gt;ADMIN_TOKEN&lt;/code&gt;, which its StatefulSet reads.&lt;br&gt;
Here that Secret comes from External Secrets. The target drops the&lt;br&gt;
recipe's file with Kapitan's &lt;code&gt;remove&lt;/code&gt; input, and the ExternalSecret&lt;br&gt;
writes a Secret of the same name with the same key, so the StatefulSet&lt;br&gt;
stays as the recipe renders it. The recipe still requires the parameter&lt;br&gt;
&lt;code&gt;admin_token&lt;/code&gt;, which therefore holds a placeholder that reaches no&lt;br&gt;
output. Without the &lt;code&gt;remove&lt;/code&gt; entry, the output would hold the recipe's&lt;br&gt;
Secret &lt;code&gt;vaultwarden&lt;/code&gt; with the placeholder, and every deploy would apply&lt;br&gt;
it over the Secret that External Secrets writes.&lt;/p&gt;

&lt;p&gt;The gpg recipient is named by its user ID. Kapitan looks the key up when&lt;br&gt;
it writes a ref and stores the key's fingerprint in the ref file, so a&lt;br&gt;
later compile does not look anything up.&lt;/p&gt;
&lt;h2&gt;
  
  
  Vault {#vault}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;vault-server.yaml&lt;/code&gt; stands in for a Vault outside the cluster. It runs&lt;br&gt;
Vault's dev server, which keeps everything in memory and mounts KV&lt;br&gt;
version 2 at &lt;code&gt;secret/&lt;/code&gt;, behind a ClusterIP Service. Its root token comes&lt;br&gt;
from a Secret that &lt;code&gt;check&lt;/code&gt; creates with a random value, and it starts&lt;br&gt;
with &lt;code&gt;-dev-no-store-token&lt;/code&gt;, so it writes no token file. Nothing outside&lt;br&gt;
the cluster reaches this Vault. &lt;code&gt;check&lt;/code&gt; runs the vault CLI inside the&lt;br&gt;
server's container with &lt;code&gt;kubectl exec&lt;/code&gt;. Vault is licensed BUSL-1.1.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; sets Vault up as its admin would:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vault auth &lt;span class="nb"&gt;enable&lt;/span&gt; approle
vault policy write vaultwarden - &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s1"&gt;'EOF'&lt;/span&gt;
path &lt;span class="s2"&gt;"secret/data/vaultwarden"&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  capabilities &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"read"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
EOF
vault write auth/approle/role/vaultwarden &lt;span class="nv"&gt;token_policies&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vaultwarden &lt;span class="nv"&gt;token_ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10m
vault write auth/approle/role/vaultwarden/role-id &lt;span class="nv"&gt;role_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;vaultwarden
&lt;span class="nv"&gt;secret_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;vault write -f -field=secret_id auth/approle/role/vaultwarden/secret-id&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;printf&lt;/span&gt; %s &lt;span class="s2"&gt;"$token"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; vault kv put secret/vaultwarden &lt;span class="nv"&gt;admin_token&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The policy reads the one path of the admin token. The role ID is set to&lt;br&gt;
&lt;code&gt;vaultwarden&lt;/code&gt;, so the SecretStore can name it, and Vault issues the&lt;br&gt;
secret ID. &lt;code&gt;check&lt;/code&gt; reads the role back:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;Vault: AppRole vaultwarden with secret_id_ttl 0, token_ttl 600, policies vaultwarden, admin token &lt;span class="k"&gt;in&lt;/span&gt; secret/vaultwarden
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;secret_id_ttl&lt;/code&gt; 0 is the AppRole default and means that the secret ID&lt;br&gt;
does not expire. A secret ID that expires would turn the ref into a&lt;br&gt;
secret to rotate as well.&lt;/p&gt;
&lt;h2&gt;
  
  
  Writing the ref {#ref}
&lt;/h2&gt;

&lt;p&gt;The secret ID goes into the ref through stdin, encrypted for the&lt;br&gt;
recipient the target lists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; %s &lt;span class="s2"&gt;"$secret_id"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; kapitan refs --write gpg:vaultwarden/vault-secret-id -t vaultwarden -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;-t vaultwarden&lt;/code&gt; takes the recipients from the target. The ref file&lt;br&gt;
&lt;code&gt;refs/vaultwarden/vault-secret-id&lt;/code&gt; holds the ciphertext and the&lt;br&gt;
recipient's fingerprint, here from a local run with the ciphertext cut:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;hF4DX62rRiT3KU4SAQdA...&lt;/span&gt;
&lt;span class="na"&gt;encoding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;original&lt;/span&gt;
&lt;span class="na"&gt;recipients&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;fingerprint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;FDD8F7AB904048215026F28F7AFFF9D3B29E7B57&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gpg&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; creates a gpg key in a keyring of its own for each run, so its&lt;br&gt;
refs go to a temporary directory. A repository commits &lt;code&gt;refs/&lt;/code&gt;, and the&lt;br&gt;
private key stays with whoever deploys.&lt;/p&gt;
&lt;h2&gt;
  
  
  Compiling without the key {#compile}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; compiles with &lt;code&gt;GNUPGHOME&lt;/code&gt; pointing to an empty keyring. The&lt;br&gt;
compiled Secret holds the ref's tag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Secret&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault-approle&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault-approle&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
&lt;span class="na"&gt;stringData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;secret-id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;?{gpg:vaultwarden/vault-secret-id:75893683}&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Opaque&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The eight characters after the last colon are the start of a SHA-256&lt;br&gt;
over the ref's path and ciphertext. A new value changes them, so a diff&lt;br&gt;
of &lt;code&gt;compiled/&lt;/code&gt; shows that a ref changed without showing the value.&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; fails if the secret ID or its base64 encoding appears anywhere in&lt;br&gt;
&lt;code&gt;compiled/&lt;/code&gt;, and if &lt;code&gt;kapitan refs --reveal&lt;/code&gt; succeeds with the empty&lt;br&gt;
keyring. From the CI run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;compiled without a gpg key: 5 files
EX-26: compiled/vaultwarden/manifests/vaultwarden/vault-approle-secret.yml holds ?&lt;span class="o"&gt;{&lt;/span&gt;gpg:vaultwarden/vault-secret-id:75893683&lt;span class="o"&gt;}&lt;/span&gt;, not the secret ID
EX-26: reveal without the key fails: GPGError: no secret key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploying {#deploy}
&lt;/h2&gt;

&lt;p&gt;The deploy reveals with the key and pipes into &lt;code&gt;kubectl apply&lt;/code&gt;, so the&lt;br&gt;
revealed manifests are not written to disk:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kapitan refs --reveal -f compiled/vaultwarden &lt;span class="o"&gt;|&lt;/span&gt; kubectl apply -f -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check&lt;/code&gt; applies the Secret &lt;code&gt;vault-approle&lt;/code&gt;, the SecretStore and the&lt;br&gt;
ExternalSecret first and the rest once the Secret &lt;code&gt;vaultwarden&lt;/code&gt; exists.&lt;br&gt;
Applied together, Vaultwarden's pod can start before External Secrets has&lt;br&gt;
written its Secret and wait in &lt;code&gt;CreateContainerConfigError&lt;/code&gt; until it&lt;br&gt;
has. The SecretStore and the ExternalSecret as compiled:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;external-secrets.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SecretStore&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;vault&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;appRole&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;approle&lt;/span&gt;
          &lt;span class="na"&gt;roleId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
          &lt;span class="na"&gt;secretRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secret-id&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault-approle&lt;/span&gt;
      &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;secret&lt;/span&gt;
      &lt;span class="na"&gt;server&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;http://vault.vault.svc.cluster.local:8200&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v2&lt;/span&gt;
&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;external-secrets.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ExternalSecret&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;remoteRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vaultwarden&lt;/span&gt;
        &lt;span class="na"&gt;property&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;admin_token&lt;/span&gt;
      &lt;span class="na"&gt;secretKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ADMIN_TOKEN&lt;/span&gt;
  &lt;span class="na"&gt;refreshInterval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
  &lt;span class="na"&gt;secretStoreRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SecretStore&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;vault&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;key: vaultwarden&lt;/code&gt; is the path below the KV mount &lt;code&gt;secret&lt;/code&gt;, and the&lt;br&gt;
provider adds the &lt;code&gt;data/&lt;/code&gt; of KV version 2 itself. From the CI run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;EX-26: External Secrets logged &lt;span class="k"&gt;in&lt;/span&gt; with the revealed secret ID and wrote the admin token into the Secret vaultwarden &lt;span class="k"&gt;in&lt;/span&gt; 1s
  SecretStore: Ready True, Valid: store validated
  ExternalSecret: Ready True, SecretSynced: secret synced
  Secret vaultwarden: keys ADMIN_TOKEN, owner ExternalSecret/vaultwarden
EX-26: admin login with the token from Vault: 200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The owner reference makes the ExternalSecret the Secret's controller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rotating the admin token {#rotation}
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;check&lt;/code&gt; writes a new token to Vault with &lt;code&gt;vault kv put&lt;/code&gt; and waits for&lt;br&gt;
the Secret. Then it logs in to Vaultwarden's admin page with both tokens,&lt;br&gt;
restarts Vaultwarden and logs in again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;EX-26: the Secret vaultwarden holds the new token 10s after it was written to Vault
EX-26: admin login with the new token, before the restart: 401
EX-26: admin login with the old token, before the restart: 200
restarted &lt;span class="k"&gt;in&lt;/span&gt; 4s
EX-26: admin login with the new token, after the restart: 200
EX-26: admin login with the old token, after the restart: 401
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Secret follows within the refresh interval, and Vaultwarden does&lt;br&gt;
not. It reads &lt;code&gt;ADMIN_TOKEN&lt;/code&gt; from its environment, and the kubelet sets&lt;br&gt;
the environment from the Secret when it starts the container. Until the&lt;br&gt;
restart, the old token logs in and the new one gets 401. After &lt;code&gt;kubectl&lt;br&gt;
rollout restart statefulset/vaultwarden&lt;/code&gt; it is the other way round.&lt;/p&gt;

&lt;p&gt;External Secrets does not restart pods. A rotation that has to take&lt;br&gt;
effect without a person needs a controller that restarts a workload when&lt;br&gt;
its Secret changes, or an app that reads the value from a mounted file&lt;br&gt;
when it uses it. Neither is tested here. Settings saved on Vaultwarden's&lt;br&gt;
admin page go to &lt;code&gt;config.json&lt;/code&gt; on its volume and take precedence over the&lt;br&gt;
environment, so a token saved there no longer follows Vault.&lt;/p&gt;

&lt;p&gt;Vaultwarden answers the fourth admin login from one address within 300&lt;br&gt;
seconds with 429 Too Many Requests, by its defaults&lt;br&gt;
&lt;code&gt;ADMIN_RATELIMIT_MAX_BURST&lt;/code&gt; 3 and &lt;code&gt;ADMIN_RATELIMIT_SECONDS&lt;/code&gt; 300. The first&lt;br&gt;
local run logged in four times before the restart and failed on that.&lt;br&gt;
&lt;code&gt;check&lt;/code&gt; now logs in three times per pod start.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the CI run showed {#ci}
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/kadet-hub/examples/actions/runs/42003380730" rel="noopener noreferrer"&gt;Run 42003380730&lt;/a&gt;&lt;br&gt;
of the examples workflow tested commit &lt;code&gt;3343fcf&lt;/code&gt; of&lt;br&gt;
&lt;a href="https://github.com/kadet-hub/examples/pull/146" rel="noopener noreferrer"&gt;kadet-hub/examples#146&lt;/a&gt;&lt;br&gt;
on 5 November 2026, on GitHub's &lt;code&gt;ubuntu-24.04&lt;/code&gt; runner, with the kind node&lt;br&gt;
image &lt;code&gt;kindest/node:v1.37.0&lt;/code&gt;. The durations below are what &lt;code&gt;check&lt;/code&gt;&lt;br&gt;
printed, in whole seconds, or come from the log's timestamps.&lt;/p&gt;

&lt;p&gt;Verifying index serial 113, the recipe and the two generators and&lt;br&gt;
pulling them took 14 seconds. kind had the cluster ready 38 seconds&lt;br&gt;
later. External Secrets and Vault were available 33 seconds after that,&lt;br&gt;
and setting up Vault took about one second. Creating the gpg key and&lt;br&gt;
writing the ref took 7 seconds, with uv installing Kapitan for the first&lt;br&gt;
&lt;code&gt;uv run&lt;/code&gt;. The compile without the key took 3.&lt;/p&gt;

&lt;p&gt;External Secrets wrote the Secret &lt;code&gt;vaultwarden&lt;/code&gt; one second after the&lt;br&gt;
ExternalSecret was applied. Vaultwarden was ready and took the first&lt;br&gt;
login 9 seconds later. The new token reached the Secret 10 seconds after&lt;br&gt;
it was written to Vault, the full refresh interval. Two local runs took 3&lt;br&gt;
and 7 seconds, depending on where in the interval the write fell. The&lt;br&gt;
restart took 4 seconds, and the whole check 125.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it leaves out {#not-tested}
&lt;/h2&gt;

&lt;p&gt;The admin token is stored in Vault as plain text, and Vaultwarden logs a&lt;br&gt;
notice about it at every start. Vaultwarden also accepts an Argon2id PHC&lt;br&gt;
string of the token, which the recipe's README recommends, so that the&lt;br&gt;
Secret holds only a hash. That is not tested here.&lt;/p&gt;

&lt;p&gt;Also not tested: Vault's Kubernetes and JWT auth, rotating the secret&lt;br&gt;
ID, ref backends other than gpg, a reveal inside Argo CD, and a Vault&lt;br&gt;
outside the cluster behind TLS. The&lt;br&gt;
&lt;a href="https://kadet-hub.org/blog/argocd-config-management-plugin-kapitan/#refs-and-secrets" rel="noopener noreferrer"&gt;Argo CD plugin post&lt;/a&gt;&lt;br&gt;
covers what a reveal in Argo CD's repo server would expose.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/external-secrets-operator-vault-kapitan/" 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>
    <item>
      <title>Kapitan generator releases, 9 to 15 November 2026</title>
      <dc:creator>Moep90</dc:creator>
      <pubDate>Wed, 18 Nov 2026 14:30:08 +0000</pubDate>
      <link>https://dev.to/kadet-hub/kapitan-generator-releases-9-to-15-november-2026-54m</link>
      <guid>https://dev.to/kadet-hub/kapitan-generator-releases-9-to-15-november-2026-54m</guid>
      <description>&lt;p&gt;Versions published on kadet-hub from 9 to 15 November 2026, each through the gate and signed. The generator page shows each version's output diff against the version before it, its SBOM and the command that verifies it.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Generator&lt;/th&gt;
&lt;th&gt;Versions&lt;/th&gt;
&lt;th&gt;Changes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/ironcore/" rel="noopener noreferrer"&gt;ironcore&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.0.3&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/6db87ce1a9988239f5f22a489d767ccd6d79bd8f/ironcore/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/keycloak/" rel="noopener noreferrer"&gt;keycloak&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.1.2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/9a2c4a6c2b9d196a7c27fdab0db2e4ef5affd6dd/keycloak/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/multus/" rel="noopener noreferrer"&gt;multus&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.0.4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/8419be2a5af48097a04dc7eebb59b48de695f801/multus/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/prometheus-operator/" rel="noopener noreferrer"&gt;prometheus-operator&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.1.7&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/1ccac6bd6b56ece25c1673a5777b58e63b6573fd/prometheus-operator/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/rook-ceph/" rel="noopener noreferrer"&gt;rook-ceph&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.0.4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/c6d0d1c69d14277943a789d504a86d47a8715703/rook-ceph/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/strimzi/" rel="noopener noreferrer"&gt;strimzi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;1.1.2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/5a03b0b9f6d474d8cf1373fc61a1c21ba3a8efb2/strimzi/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/terraform-aws/" rel="noopener noreferrer"&gt;terraform-aws&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.1.5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/75731f173960a0d9d4e14ce92d7e6bc9bf8f0678/terraform-aws/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/terraform-azurerm/" rel="noopener noreferrer"&gt;terraform-azurerm&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.1.5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/c96fd6966b2d2b55caf0e6171f02b53ba570c039/terraform-azurerm/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/terraform-google/" rel="noopener noreferrer"&gt;terraform-google&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.1.5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/0112d5d5e939e70fe438acc0f811cf2c5483003c/terraform-google/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://kadet-hub.org/generators/terraform-opentelekomcloud/" rel="noopener noreferrer"&gt;terraform-opentelekomcloud&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;0.1.4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/kadet-hub/generators/blob/102b184a8dea3256133476e5a7b04ccac4f4b22d/terraform-opentelekomcloud/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  ironcore
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ironcore 1.0.3
&lt;/h3&gt;

&lt;p&gt;Built for IronCore 0.9.0. The breaking changes of the release are in the IRI runtime API, etcd and the Kubernetes Go libraries. The generated OpenAPI v3 documents of the compute, networking and storage groups are the same as at v0.8.0, so the shipped schemas and rendered output are unchanged. The validation and defaulting files the README cites are unchanged at v0.9.0, and their links move to that tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  keycloak
&lt;/h2&gt;

&lt;h3&gt;
  
  
  keycloak 1.1.2
&lt;/h3&gt;

&lt;p&gt;Built for Keycloak Operator 26.8.2. The CRDs and their JSON Schemas are unchanged from 26.8.1, as is the operator code the generator's defaults rely on. The upstream files the README cites are unchanged at 26.8.2, and their links move to that tag. Rendered output is unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  multus
&lt;/h2&gt;

&lt;h3&gt;
  
  
  multus 1.0.4
&lt;/h3&gt;

&lt;p&gt;Built for Multus CNI 4.3.2. Its NetworkAttachmentDefinition CRD is unchanged, so the shipped schema and rendered output are unchanged. Multus 4.3.2 still builds with network-attachment-definition-client v1.7.6. Of the Multus files the README cites, only &lt;code&gt;docs/how-to-use.md&lt;/code&gt; changes at v4.3.2, by a &lt;code&gt;--force-config-watch&lt;/code&gt; section outside the cited one, and their links move to that tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  prometheus-operator
&lt;/h2&gt;

&lt;h3&gt;
  
  
  prometheus-operator 1.1.7
&lt;/h3&gt;

&lt;p&gt;Built for Prometheus Operator 0.95.1. Its CRDs add fields and remove none, and their kinds, versions and short names are unchanged, so the flat keys, shorthands and output keys still apply. New fields such as &lt;code&gt;extraScrapeMetrics&lt;/code&gt; on Prometheus, PrometheusAgent, ServiceMonitor, PodMonitor, Probe and ScrapeConfig, or &lt;code&gt;alertmanagerConfigFileSystemMode&lt;/code&gt; on Alertmanager, go into &lt;code&gt;spec&lt;/code&gt;. In the CRDs, &lt;code&gt;clientAuthType&lt;/code&gt; of &lt;code&gt;web.tlsConfig&lt;/code&gt; and of Alertmanager &lt;code&gt;clusterTLS.server&lt;/code&gt; only accepts the five Go &lt;code&gt;tls.ClientAuthType&lt;/code&gt; names. A Webex receiver in an AlertmanagerConfig needs &lt;code&gt;httpConfig.authorization&lt;/code&gt; or &lt;code&gt;httpConfig.bearerTokenSecret&lt;/code&gt;. With &lt;code&gt;alertmanagerConfigFileSystemMode&lt;/code&gt; and &lt;code&gt;alertmanagerConfigMatcherStrategy&lt;/code&gt; unset, the operator now rejects an AlertmanagerConfig that references a file in the Alertmanager container, such as a Telegram &lt;code&gt;botTokenFile&lt;/code&gt;, unless &lt;code&gt;alertmanagerConfiguration&lt;/code&gt; names it. The upstream files the README cites say the same at v0.95.1, and their links move to that tag. The kube-prometheus-stack links move to chart 93.1.1, the newest that ships 0.95.1. The selector values and template lines the README cites are the same as in 92.3.0. Rendered output is unchanged.&lt;/p&gt;

&lt;h2&gt;
  
  
  rook-ceph
&lt;/h2&gt;

&lt;h3&gt;
  
  
  rook-ceph 1.0.4
&lt;/h3&gt;

&lt;p&gt;Built for Rook 1.21.2. Its &lt;code&gt;deploy/examples/crds.yaml&lt;/code&gt; is the same file as at 1.21.1, so the shipped schemas and CRDs and the rendered output are unchanged. The upstream files the README cites are unchanged at v1.21.2 apart from &lt;code&gt;spec.go&lt;/code&gt;, where the cited code is the same but now at lines 198 to 204. Their links move to that tag. The example Ceph image is still &lt;code&gt;quay.io/ceph/ceph:v20.2.4&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  strimzi
&lt;/h2&gt;

&lt;h3&gt;
  
  
  strimzi 1.1.2
&lt;/h3&gt;

&lt;p&gt;Built for Strimzi 1.3.1. Its Kafka, KafkaNodePool, KafkaTopic and KafkaUser CRDs are unchanged, so the shipped schemas and rendered output are unchanged. Strimzi 1.3.1 adds Kafka 4.3.2 and makes it the default, which the Cluster Operator uses for a Kafka entry without &lt;code&gt;version&lt;/code&gt;. The upstream files and documentation pages the README and the code comments cite differ at 1.3.1 only in Strimzi, Kafka and Bridge versions, and their links move to that tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  terraform-aws
&lt;/h2&gt;

&lt;h3&gt;
  
  
  terraform-aws 0.1.5
&lt;/h3&gt;

&lt;p&gt;Pins hashicorp/aws 6.72.0 instead of 6.71.0 in &lt;code&gt;providers.tf.json&lt;/code&gt; and ships its provider schema extract under &lt;code&gt;schemas/terraform/&lt;/code&gt;, so the catalog shows "Built for hashicorp/aws 6.72.0". The extracts of both versions are the same, and the 6.72.0 release notes change none of the 15 resource types the generator emits. Rendered output differs only in the provider version.&lt;/p&gt;

&lt;h2&gt;
  
  
  terraform-azurerm
&lt;/h2&gt;

&lt;h3&gt;
  
  
  terraform-azurerm 0.1.5
&lt;/h3&gt;

&lt;p&gt;Pins hashicorp/azurerm 5.13.0 instead of 5.12.0 in &lt;code&gt;providers.tf.json&lt;/code&gt; and ships its provider schema extract under &lt;code&gt;schemas/terraform/&lt;/code&gt;, so the catalog shows "Built for hashicorp/azurerm 5.13.0". Of the seven resource types the generator emits, the 5.13.0 release notes name only &lt;code&gt;azurerm_storage_account&lt;/code&gt;. It gains the optional &lt;code&gt;smb_oauth_enabled&lt;/code&gt;, which the generator does not set and which is the only difference between the two extracts. Its &lt;code&gt;customer_managed_key&lt;/code&gt; check now also accepts &lt;code&gt;FileStorage&lt;/code&gt; accounts on the &lt;code&gt;V2&lt;/code&gt; billing model, and the generator emits &lt;code&gt;StorageV2&lt;/code&gt; accounts without a customer-managed key. Of the resource sources of the seven types only &lt;code&gt;storage_account_resource.go&lt;/code&gt; changes, for these two entries. Rendered output differs only in the provider version.&lt;/p&gt;

&lt;h2&gt;
  
  
  terraform-google
&lt;/h2&gt;

&lt;h3&gt;
  
  
  terraform-google 0.1.5
&lt;/h3&gt;

&lt;p&gt;Pins hashicorp/google 8.10.0 instead of 8.9.0 in &lt;code&gt;providers.tf.json&lt;/code&gt; and ships its provider schema extract under &lt;code&gt;schemas/terraform/&lt;/code&gt;, so the catalog shows "Built for hashicorp/google 8.10.0". The extracts of both versions are the same, and the 8.10.0 release notes name none of the seven resource types the generator emits. Rendered output differs only in the provider version.&lt;/p&gt;

&lt;h2&gt;
  
  
  terraform-opentelekomcloud
&lt;/h2&gt;

&lt;h3&gt;
  
  
  terraform-opentelekomcloud 0.1.4
&lt;/h3&gt;

&lt;p&gt;Pins opentelekomcloud/opentelekomcloud 1.37.12 instead of 1.37.11 in &lt;code&gt;providers.tf.json&lt;/code&gt; and ships its provider schema extract under &lt;code&gt;schemas/terraform/&lt;/code&gt;, so the catalog shows "Built for opentelekomcloud/opentelekomcloud 1.37.12". The extracts of both versions are the same, and the 1.37.12 release notes name none of the seven resource types the generator emits. Rendered output differs only in the provider version.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://kadet-hub.org/blog/releases-2026-11-09/" 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>
