<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Flux CLI Plugins</title><link>https://main.docs.fluxcd.io/flux/cli-plugins/</link><description>Recent content in Flux CLI Plugins on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://main.docs.fluxcd.io/flux/cli-plugins/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Flux Mirror</title><link>https://main.docs.fluxcd.io/flux/cli-plugins/flux-mirror/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://main.docs.fluxcd.io/flux/cli-plugins/flux-mirror/</guid><description>
&lt;p>&lt;strong>Flux Mirror&lt;/strong> is a CLI for mirroring Helm charts, OCI artifacts and
container images between registries using a declarative approach.&lt;/p>
&lt;p>The intended use case is feeding an internal mirror registry that backs
Flux OCIRepository and Kubernetes Deployments, so
clusters never reach out to upstream registries at reconcile time.&lt;/p>
&lt;p>It also enables migration away from HTTP/S &lt;code>HelmRepository&lt;/code> sources: chart
versions are republished as OCI Helm artifacts that &lt;code>HelmRelease&lt;/code> consumes
via an &lt;code>OCIRepository&lt;/code> in &lt;code>spec.chartRef&lt;/code>, dropping the runtime dependency
on upstream chart repositories.&lt;/p>
&lt;h2 id="features">Features&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>OCI artifacts&lt;/strong> — mirror container images, OCI Helm charts, Flux OCI
artifacts, and any other OCI-addressable artifact between registries.
Manifests and blobs are copied byte-for-byte; multi-arch manifest lists
are mirrored as a whole, no platform filtering.&lt;/li>
&lt;li>&lt;strong>Helm charts&lt;/strong> — mirror charts from HTTP/S Helm repositories to an OCI registries.
Chart bytes are re-published as a deterministic Helm-OCI artifact, so
drift detection on re-runs is content-based and stable.&lt;/li>
&lt;li>&lt;strong>OCI 1.1 referrers&lt;/strong> — opt-in mirror of signatures, SBOMs, and attestations attached to artifacts.&lt;/li>
&lt;li>&lt;strong>Cosign verification&lt;/strong> — opt-in keyless signature verification for selected
source artifacts before they are mirrored, with optional minimum signature age.&lt;/li>
&lt;li>&lt;strong>Selector pipeline&lt;/strong> — for OCI artifacts, a four-step
&lt;code>regex → semver → sort → top-N&lt;/code> filter. For charts, a semver constraint
plus top-N. Sort by &lt;code>semver&lt;/code>, &lt;code>alphabetical&lt;/code>, or &lt;code>numerical&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Idempotent&lt;/strong> — destination digests are compared per tag/version. Re-runs
copy only what&amp;rsquo;s missing or drifted.&lt;/li>
&lt;li>&lt;strong>Drift gating&lt;/strong> — destination drift (different content under the same tag) is reported
as a distinct outcome and exit code, so audit pipelines can differentiate &amp;ldquo;out of date&amp;rdquo; from &amp;ldquo;mutated tags&amp;rdquo;.&lt;/li>
&lt;li>&lt;strong>Registry auth&lt;/strong> — OCI auth supports Docker config and credential helpers,
cloud workload identity for ECR/ACR/GAR, and per-host bearer credentials from
GitHub/Forgejo OIDC, GCP, Azure, AWS STS, SPIFFE JWT-SVID, env vars, files, or
JWK-signed JWTs. Per-host TLS/mTLS (custom CA, client cert, or SPIFFE X.509-SVID)
is also supported. Helm HTTP/S credentials come from Helm&amp;rsquo;s repositories config.&lt;/li>
&lt;li>&lt;strong>Structured output&lt;/strong> — &lt;code>text&lt;/code> and &lt;code>yaml&lt;/code>/&lt;code>json&lt;/code> for downstream
tooling, plus a verbose mode that streams every blob and manifest digest
for diagnosing TLS, auth, or push failures.&lt;/li>
&lt;/ul>
&lt;h2 id="install">Install&lt;/h2>
&lt;p>Install the plugin with the Flux CLI:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux plugin install mirror
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="quickstart">Quickstart&lt;/h2>
&lt;p>Authenticate once against the destination and optionally source registries:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>docker login ghcr.io
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For private HTTP/S Helm repositories, login with Helm:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>helm repo add private https://charts.example.com --username &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#bb60d5">$USER&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span> --password &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#bb60d5">$TOKEN&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Write a config file describing what to mirror:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># flux-mirror.yaml&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>mirror.plugin.fluxcd.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">charts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>external-dns&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">source&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://kubernetes-sigs.github.io/external-dns/&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">destination&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>oci://ghcr.io/my-org/charts&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;*&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">limit&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">3&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">artifacts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">source&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>registry.k8s.io/external-dns/external-dns&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">destination&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/my-org/external-dns&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">selector&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;gt;=0.15.0&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">limit&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">3&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">includeReferrers&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Run the sync:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux mirror sync flux-mirror.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can also read the config from stdin:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux mirror sync - &amp;lt; flux-mirror.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Preview without writing:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux mirror sync flux-mirror.yaml --dry-run
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Force a resync of drifted tags e.g. &lt;code>latest&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux mirror sync flux-mirror.yaml --overwrite
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>See
&lt;a href="https://github.com/fluxcd/flux-mirror/tree/v0.8.0/examples" target="_blank">&lt;code>examples/&lt;/code>&lt;/a> for more configurations and
&lt;a href="https://main.docs.fluxcd.io/flux/cli-plugins/flux-mirror/sync/">&lt;code>docs/sync.md&lt;/code>&lt;/a> for the full flag reference.&lt;/p></description></item><item><title>Flux: Flux Schema</title><link>https://main.docs.fluxcd.io/flux/cli-plugins/flux-schema/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://main.docs.fluxcd.io/flux/cli-plugins/flux-schema/</guid><description>
&lt;p>&lt;strong>Flux Schema&lt;/strong> is a CLI for validating Kubernetes YAML manifests against JSON
Schema and CEL rules using the same evaluation semantics as the Kubernetes
API server. It ships as a single Go binary with a built-in catalog covering
Kubernetes, OpenShift, Gateway API, and the Flux ecosystem CRDs.&lt;/p>
&lt;p>This project is inspired by &lt;code>kubeconform&lt;/code>, adding CEL rule evaluation,
built-in schema extraction for CRDs &amp;amp; OpenAPI swagger, and a curated catalog
refreshed automatically from upstream stable releases.&lt;/p>
&lt;h2 id="features">Features&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Strict schema validation&lt;/strong> — every field of every Kubernetes built-in
kind and custom resource is checked. Unknown fields, wrong types, and
missing required properties are all reported as schema violations.&lt;/li>
&lt;li>&lt;strong>CEL evaluation&lt;/strong> — &lt;code>x-kubernetes-validations&lt;/code> rules evaluated with the
same engine as Kubernetes API server.&lt;/li>
&lt;li>&lt;strong>Strict YAML decoding&lt;/strong> — duplicate keys are rejected matching Flux
behavior. Metadata name, namespace, labels, and annotations are
checked against API server rules (DNS-1123, qualified names).&lt;/li>
&lt;li>&lt;strong>Built-in catalog&lt;/strong> — JSON Schemas with CEL rules for Kubernetes, OpenShift,
Gateway API, Flux, Flagger, and Flux Operator CRDs, refreshed automatically against upstream.&lt;/li>
&lt;li>&lt;strong>Custom catalogs&lt;/strong> — extract JSON Schemas from Kubernetes CRDs and OpenAPI swagger files,
then layer your catalog on top of the default schemas.&lt;/li>
&lt;li>&lt;strong>SOPS-aware&lt;/strong> — strip SOPS metadata fields so the rest of the document can be validated without decryption.&lt;/li>
&lt;li>&lt;strong>Repository discovery&lt;/strong> — catalog a GitOps repository into a structured inventory
designed for AI agents: directory classification, Flux resources with their defining
files, and Kubernetes resource counts.&lt;/li>
&lt;li>&lt;strong>Structured reports&lt;/strong> — versioned JSON or YAML validation reports for CI tooling and downstream automation.&lt;/li>
&lt;li>&lt;strong>Declarative validation&lt;/strong> — define the validation config in a &lt;code>.fluxschema.yml&lt;/code> file for reproducible runs across local and CI environments.&lt;/li>
&lt;li>&lt;strong>GitHub Actions&lt;/strong> — composite actions for installation and manifests validation on GitHub runners.&lt;/li>
&lt;/ul>
&lt;h2 id="install">Install&lt;/h2>
&lt;p>Install the plugin with the Flux CLI:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux plugin install schema
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For GitHub Actions runners, use the
&lt;a href="https://github.com/fluxcd/flux-schema/tree/v0.6.0/actions/setup" target="_blank">&lt;code>actions/setup&lt;/code>&lt;/a> action.&lt;/p>
&lt;h2 id="quickstart">Quickstart&lt;/h2>
&lt;p>Validate a directory tree against the built-in catalog and 3rd-party schemas:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux schema validate ./manifests &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span>--schema-location default &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span>--schema-location https://raw.githubusercontent.com/datreeio/CRDs-catalog/main
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Build a kustomize overlay and validate the generated manifests:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>kustomize build ./clusters/production | flux schema validate --verbose
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Render a Helm chart and validate the generated manifests:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>helm template ./charts/app | flux schema validate -v --skip-missing-schemas
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Build a
&lt;a href="https://fluxoperator.dev/docs/resourcesets/introduction/" target="_blank">ResourceSet&lt;/a> and validate the generated manifests:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux operator build rset -f tenants.yaml | flux schema validate
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Emit a structured report for CI tooling:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>flux schema validate ./manifests -o json
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Extract JSON Schemas from your CRDs and layer them on top of the built-in catalog:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>kubectl get crds -o yaml | flux schema extract crd -d ./my-catalog
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>flux schema validate ./manifests &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --schema-location ./my-catalog &lt;span style="color:#4070a0;font-weight:bold">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-weight:bold">&lt;/span> --schema-location default
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item></channel></rss>