<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Migrate from Flux v1</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/</link><description>Recent content in Migrate from Flux v1 on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Migrate from Flux v1 to v2</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/</guid><description>
&lt;p>This guide walks you through migrating from Flux v1 to v2.
Read the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/faq-migration/">FAQ&lt;/a> to find out what differences are between v1 and v2.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>You will need a Kubernetes cluster version &lt;strong>1.20&lt;/strong> or newer
and kubectl version &lt;strong>1.20&lt;/strong> or newer.&lt;/p>
&lt;h3 id="install-flux-v2-cli">Install Flux v2 CLI&lt;/h3>
&lt;p>With Homebrew:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>brew install fluxcd/tap/flux
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With Bash:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>curl -s https://fluxcd.io/install.sh | sudo bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># enable completions in ~/.bash_profile&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>. &amp;lt;&lt;span style="color:#666">(&lt;/span>flux completion bash&lt;span style="color:#666">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Command-line completion for &lt;code>zsh&lt;/code>, &lt;code>fish&lt;/code>, and &lt;code>powershell&lt;/code>
are also supported with their own sub-commands.&lt;/p>
&lt;p>Binaries for macOS, Windows and Linux AMD64/ARM are available for download on the
&lt;a href="https://github.com/fluxcd/flux2/releases" target="_blank">release page&lt;/a>.&lt;/p>
&lt;p>Verify that your cluster satisfies the prerequisites with:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux check --pre
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="gitops-migration">GitOps migration&lt;/h2>
&lt;p>Flux v2 offers an installation procedure that is declarative first
and disaster resilient.&lt;/p>
&lt;p>Using the &lt;code>flux bootstrap&lt;/code> command you can install Flux on a
Kubernetes cluster and configure it to manage itself from a Git
repository. The Git repository created during bootstrap can be used
to define the state of your fleet of Kubernetes clusters.&lt;/p>
&lt;p>For a detailed walk-through of the bootstrap procedure please see the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/">installation
guide&lt;/a>.&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">'flux bootstrap' target&lt;/h4>
&lt;code>flux bootstrap&lt;/code> should not be run against a Git branch or path
that is already being synchronized by Flux v1, as this will make
them fight over the resources. Instead, bootstrap to a &lt;strong>new Git
repository, branch or path&lt;/strong>, and continue with moving the
manifests.
&lt;/div>
&lt;p>After you&amp;rsquo;ve installed Flux v2 on your cluster using bootstrap,
you can delete the Flux v1 from your clusters and move the manifests from the
Flux v1 repository to the bootstrap one. Typically deleting Flux v1 can be done by deleting these helm installations:
&lt;a href="https://github.com/fluxcd/flux/blob/master/chart/flux/README.md#uninstalling-the-chart" target="_blank">flux&lt;/a> and
&lt;a href="https://github.com/fluxcd/helm-operator/blob/master/chart/helm-operator/README.md#uninstall" target="_blank">helm-operator&lt;/a>&lt;/p>
&lt;p>One key change in Flux v2 is &amp;ldquo;server-side apply&amp;rdquo; that enforces strict validation of the manifests. It is important to note that manifests are applied atomically to the cluster only if server side validation of the apply passes. If one Kustomization has multiple resources, an error in any one of the resources will also prevent other resources in that group from getting applied. This is a breaking change from Flux v1.&lt;/p>
&lt;h2 id="in-place-migration">In-place migration&lt;/h2>
&lt;div class="alert alert-warning" role="alert">
For production use we recommend using the &lt;strong>bootstrap&lt;/strong> procedure (see the
&lt;a href="#gitops-migration">Gitops migration&lt;/a> section above),
but if you wish to install Flux v2 in the
same way as Flux v1 then follow along.
&lt;/div>
&lt;h3 id="flux-read-only-mode">Flux read-only mode&lt;/h3>
&lt;p>Assuming you&amp;rsquo;ve installed Flux v1 to sync a directory with plain YAMLs from a private Git repo:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># create namespace&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kubectl create ns flux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># deploy Flux v1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>fluxctl install &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>--git-url&lt;span style="color:#666">=&lt;/span>git@github.com:org/app &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>--git-branch&lt;span style="color:#666">=&lt;/span>main &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>--git-path&lt;span style="color:#666">=&lt;/span>./deploy &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>--git-readonly &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>--namespace&lt;span style="color:#666">=&lt;/span>flux | kubectl apply -f -
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># print deploy key&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>fluxctl identity --k8s-fwd-ns flux
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># trigger sync&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>fluxctl sync --k8s-fwd-ns flux
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Uninstall Flux v1&lt;/h4>
Before you proceed, scale the Flux v1 deployment to zero
or delete its namespace and RBAC.
&lt;/div>
&lt;p>If there are YAML files in your &lt;code>deploy&lt;/code> dir that are not meant to be
applied on the cluster, you can exclude them by placing a &lt;code>.sourceignore&lt;/code> in your repo root:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ cat .sourceignore
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># exclude all&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/*
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># include deploy dir&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>!/deploy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># exclude files from deploy dir&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/deploy/**/eksctl.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/deploy/**/charts
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Install Flux v2 in the &lt;code>flux-system&lt;/code> namespace:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux install &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> --network-policy&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020">true&lt;/span> &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> --watch-all-namespaces&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020">true&lt;/span> &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> --namespace&lt;span style="color:#666">=&lt;/span>flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✚ generating manifests
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ manifests build completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► installing components in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ install completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ verifying installation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ source-controller ready
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ kustomize-controller ready
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ helm-controller ready
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ notification-controller ready
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ install finished
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Register your Git repository and add the deploy key with read-only access:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux create &lt;span style="color:#007020">source&lt;/span> git app &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> --url&lt;span style="color:#666">=&lt;/span>ssh://git@github.com/org/app &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> --branch&lt;span style="color:#666">=&lt;/span>main &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> --interval&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► generating deploy key pair
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp2x9ghVmv1zD...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Have you added the deploy key to your repository: y
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► collecting preferred public key from SSH server
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ collected public key from SSH server:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► applying secret with keys
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ authentication configured
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✚ generating GitRepository &lt;span style="color:#007020">source&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► applying GitRepository &lt;span style="color:#007020">source&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository &lt;span style="color:#007020">source&lt;/span> created
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> GitRepository &lt;span style="color:#007020">source&lt;/span> reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository &lt;span style="color:#007020">source&lt;/span> reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ fetched revision: main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9b
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Configure the reconciliation of the &lt;code>deploy&lt;/code> dir on your cluster:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux create kustomization app &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> --source&lt;span style="color:#666">=&lt;/span>GitRepository/app &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> --path&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;./deploy&amp;#34;&lt;/span> &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> --prune&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020">true&lt;/span> &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> --interval&lt;span style="color:#666">=&lt;/span>10m
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✚ generating Kustomization
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► applying Kustomization
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization created
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> Kustomization reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization app is ready
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ applied revision main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9b
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If your repository contains secrets encrypted with Mozilla SOPS, please read this
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/">guide&lt;/a>.&lt;/p>
&lt;p>Pull changes from Git and apply them immediately:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux reconcile kustomization app --with-source
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>List all Kubernetes objects reconciled by &lt;code>app&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl get all --all-namespaces &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>-l&lt;span style="color:#666">=&lt;/span>kustomize.toolkit.fluxcd.io/name&lt;span style="color:#666">=&lt;/span>app &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>-l&lt;span style="color:#666">=&lt;/span>kustomize.toolkit.fluxcd.io/namespace&lt;span style="color:#666">=&lt;/span>flux-system
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="flux-with-kustomize">Flux with Kustomize&lt;/h3>
&lt;p>Assuming you&amp;rsquo;ve installed Flux v1 to sync a Kustomize overlay from an HTTPS Git repository:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>fluxctl install &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>--git-url&lt;span style="color:#666">=&lt;/span>https://github.com/org/app &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>--git-branch&lt;span style="color:#666">=&lt;/span>main &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>--manifest-generation &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>--namespace&lt;span style="color:#666">=&lt;/span>flux | kubectl apply -f -
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With the following &lt;code>.flux.yaml&lt;/code> in the root dir:&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:#062873;font-weight:bold">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1&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">patchUpdated&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">generators&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">command&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kustomize build ./overlays/prod&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">patchFile&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-patch.yaml&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Uninstall Flux v1&lt;/h4>
Before you proceed, delete the Flux v1 namespace
and remove the &lt;code>.flux.yaml&lt;/code> from your repo.
&lt;/div>
&lt;p>Install Flux v2 in the &lt;code>flux-system&lt;/code> namespace:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux install
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Register the Git repository using a personal access token:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux create &lt;span style="color:#007020">source&lt;/span> git app &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> --url&lt;span style="color:#666">=&lt;/span>https://github.com/org/app &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> --branch&lt;span style="color:#666">=&lt;/span>main &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> --username&lt;span style="color:#666">=&lt;/span>git &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> --password&lt;span style="color:#666">=&lt;/span>token &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> --interval&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Configure the reconciliation of the &lt;code>prod&lt;/code> overlay on your cluster:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux create kustomization app &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> --source&lt;span style="color:#666">=&lt;/span>GitRepository/app &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> --path&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;./overlays/prod&amp;#34;&lt;/span> &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> --prune&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020">true&lt;/span> &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> --interval&lt;span style="color:#666">=&lt;/span>10m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Check the status of the Kustomization reconciliation:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux get kustomizations app
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME REVISION SUSPENDED READY
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>app main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9b False True
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="flux-with-slack-notifications">Flux with Slack notifications&lt;/h3>
&lt;p>Assuming you have configured Flux v1 to send notifications to Slack with
&lt;a href="https://github.com/justinbarrick/fluxcloud" target="_blank">FluxCloud&lt;/a>.&lt;/p>
&lt;p>With Flux v2, create an alert provider for a Slack channel:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux create alert-provider slack &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> --type&lt;span style="color:#666">=&lt;/span>slack &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> --channel&lt;span style="color:#666">=&lt;/span>some-channel-name &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> --address&lt;span style="color:#666">=&lt;/span>https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>And configure notifications for the &lt;code>app&lt;/code> reconciliation events:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>flux create alert app &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> --provider-ref&lt;span style="color:#666">=&lt;/span>slack &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> --event-severity&lt;span style="color:#666">=&lt;/span>info &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> --event-source&lt;span style="color:#666">=&lt;/span>GitRepository/app &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> --event-source&lt;span style="color:#666">=&lt;/span>Kustomization/app
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For more details, read the guides on how to configure
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/monitoring/alerts/">notifications&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/webhook-receivers/">webhooks&lt;/a>.&lt;/p>
&lt;h3 id="flux-debugging">Flux debugging&lt;/h3>
&lt;p>Check the status of Git operations:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ kubectl -n flux-system get gitrepositories
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME READY MESSAGE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>app True Fetched revision: main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9b
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020">test&lt;/span> False SSH handshake failed: unable to authenticate, attempted methods &lt;span style="color:#666">[&lt;/span>none publickey&lt;span style="color:#666">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Check the status of the cluster reconciliation with kubectl:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ kubectl -n flux-system get kustomizations
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME READY STATUS
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>app True Applied revision: main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020">test&lt;/span> False The Service &lt;span style="color:#4070a0">&amp;#39;backend&amp;#39;&lt;/span> is invalid: spec.type: Unsupported value: &lt;span style="color:#4070a0">&amp;#39;Ingress&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Suspend a reconciliation:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux &lt;span style="color:#007020">suspend&lt;/span> kustomization app
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► suspending kustomization app in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ kustomization suspended
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Check the status with kubectl:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ kubectl -n flux-system get kustomization app
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME READY STATUS
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>app False Kustomization is suspended, skipping reconciliation
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Resume a reconciliation:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux resume kustomization app
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► resuming Kustomization app in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization resumed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> Kustomization reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ applied revision main@sha1:5302d04c2ab8f0579500747efa0fe7abc72c8f9b
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Flux: Migrating image update automation to Flux v2</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-automation-migration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-automation-migration/</guid><description>
&lt;p>&amp;ldquo;Image Update Automation&amp;rdquo; is a process in which Flux makes commits to your Git repository when it
detects that there is a new image to be used in a workload (e.g., a Deployment). In Flux v2 this
works quite differently to how it worked in Flux v1. This guide explains the differences and how to
port your cluster configuration from v1 to v2. There is also a
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/">tutorial for using image update
automation with a new cluster&lt;/a>.&lt;/p>
&lt;h2 id="overview-of-changes-between-v1-and-v2">Overview of changes between v1 and v2&lt;/h2>
&lt;p>In Flux v1, image update automation (from here, just &amp;ldquo;automation&amp;rdquo;) was built into the Flux daemon,
which scanned everything it found in the cluster and updated the Git repository it was syncing.&lt;/p>
&lt;p>In Flux v2,&lt;/p>
&lt;ul>
&lt;li>automation is controlled with custom resources, not annotations&lt;/li>
&lt;li>ordering images by build time is not supported (there is
&lt;a href="#how-to-migrate-annotations-to-image-policies">a section
below&lt;/a> explaining what to do instead)&lt;/li>
&lt;li>the fields to update in files are marked explicitly, rather than inferred from annotations.&lt;/li>
&lt;/ul>
&lt;h4 id="automation-is-now-controlled-by-custom-resources">Automation is now controlled by custom resources&lt;/h4>
&lt;p>Flux v2 breaks down the functions in Flux v1&amp;rsquo;s daemon into controllers, with each having a specific
area of concern. Automation is now done by two controllers: one which scans image repositories to
find the latest images, and one which uses that information to commit changes to git
repositories. These are in turn separate to the syncing controllers.&lt;/p>
&lt;p>This means that automation in Flux v2 is governed by custom resources. In Flux v1 the daemon scanned
everything, and looked at annotations on the resources to determine what to update. Automation in v2
is more explicit than in v1 &amp;ndash; you have to mention exactly which images you want to be scanned, and
which fields you want to be updated.&lt;/p>
&lt;p>A consequence of using custom resources is that with Flux v2 you can have an arbitrary number of
automations, targeting different Git repositories if you wish, and updating different sets of
images. If you run a multitenant cluster, the tenants can define automation in their own namespaces,
for their own Git repositories.&lt;/p>
&lt;h4 id="selecting-an-image-is-more-flexible">Selecting an image is more flexible&lt;/h4>
&lt;p>The ways in which you choose to select an image have changed. In Flux v1, you generally supply a
filter pattern, and the latest image is the image with the most recent build time out of those
filtered. In Flux v2, you choose an ordering, and separately specify a filter for the tags to
consider. These are dealt with in detail below.&lt;/p>
&lt;p>Selecting an image by build time is no longer supported. This is the implicit default in Flux v1. In
Flux v2, you will need to tag images so that they sort in the order you would like &amp;ndash;
&lt;a href="#how-to-use-sortable-image-tags">see
below&lt;/a> for how to do this conveniently.&lt;/p>
&lt;h4 id="fields-to-update-are-explicitly-marked">Fields to update are explicitly marked&lt;/h4>
&lt;p>Lastly, in Flux v2 the fields to update in files are marked explicitly. In Flux v1 they are inferred
from the type of the resource, along with the annotations given. The approach in Flux v1 was limited
to the types that had been programmed in, whereas Flux v2 can update any Kubernetes object (and some
files that aren&amp;rsquo;t Kubernetes objects, like &lt;code>kustomization.yaml&lt;/code>).&lt;/p>
&lt;h2 id="preparing-for-migration">Preparing for migration&lt;/h2>
&lt;p>It is best to complete migration of your system to &lt;em>Flux v2 syncing&lt;/em> first, using the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/">Flux v1
migration guide&lt;/a>. This will remove Flux v1 from the system, along with its image
automation. You can then reintroduce automation with Flux v2 by following the instructions in this
guide.&lt;/p>
&lt;p>It is safe to leave the annotations for Flux v1 in files while you reintroduce automation, because
Flux v2 will ignore them.&lt;/p>
&lt;p>To migrate to Flux v2 automation, you will need to do three things:&lt;/p>
&lt;ul>
&lt;li>make sure you are running the automation controllers; then,&lt;/li>
&lt;li>declare the automation with an &lt;code>ImageUpdateAutomation&lt;/code> object; and,&lt;/li>
&lt;li>migrate each manifest by translate Flux v1 annotations to Flux v2 &lt;code>ImageRepository&lt;/code> and
&lt;code>ImagePolicy&lt;/code> objects, and putting update markers in the manifest file.&lt;/li>
&lt;/ul>
&lt;h3 id="where-to-keep-imagerepository-imagepolicy-and-imageupdateautomation-manifests">Where to keep &lt;code>ImageRepository&lt;/code>, &lt;code>ImagePolicy&lt;/code> and &lt;code>ImageUpdateAutomation&lt;/code> manifests&lt;/h3>
&lt;p>This guide assumes you want to manage automation itself via Flux. In the following sections,
manifests for the objects controlling automation are saved in files, committed to Git, and applied
in the cluster with Flux.&lt;/p>
&lt;p>A Flux v2 installation will typically have a Git repository structured like this:&lt;/p>
&lt;pre tabindex="0">&lt;code>&amp;lt;...&amp;gt;/flux-system/
gotk-components.yaml
gotk-sync.yaml
&amp;lt;...&amp;gt;/app/
# deployments etc.
&lt;/code>&lt;/pre>&lt;p>The &lt;code>&amp;lt;...&amp;gt;&lt;/code> is the path to a particular cluster&amp;rsquo;s definitions &amp;ndash; this may be simply &lt;code>.&lt;/code>, or
something like &lt;code>clusters/my-cluster&lt;/code>. To get the files in the right place, set a variable for this
path:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">CLUSTER_PATH&lt;/span>&lt;span style="color:#666">=&lt;/span>&amp;lt;...&amp;gt; &lt;span style="color:#60a0b0;font-style:italic"># e.g., &amp;#34;.&amp;#34; or &amp;#34;clusters/my-cluster&amp;#34;, or ...&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">AUTO_PATH&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">$CLUSTER_PATH&lt;/span>/automation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ mkdir ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The file &lt;code>$CLUSTER_PATH/flux-system/gotk-components.yaml&lt;/code> has definitions of all the Flux v2
controllers and custom resource definitions. The file &lt;code>gotk-sync.yaml&lt;/code> defines a &lt;code>GitRepository&lt;/code> and
a &lt;code>Kustomization&lt;/code> which will sync manifests under &lt;code>$CLUSTER_PATH/&lt;/code>.&lt;/p>
&lt;p>To these will be added definitions for automation objects. This guide puts manifest files for
automation in &lt;code>$CLUSTER_PATH/automation/&lt;/code>, but there is no particular structure required
by Flux. The automation objects do not have to be in the same namespace as the objects to be
updated.&lt;/p>
&lt;h4 id="migration-on-a-branch">Migration on a branch&lt;/h4>
&lt;p>This guide assumes you will commit changes to the branch that is synced by Flux, as this is the
simplest way to understand.&lt;/p>
&lt;p>It may be less disruptive to put migration changes on a branch, then merging when you have completed
the migration. You would need to either change the &lt;code>GitRepository&lt;/code> to point at the migration branch,
or have separate &lt;code>GitRepository&lt;/code> and &lt;code>Kustomization&lt;/code> objects for the migrated parts of your Git
repository. The main thing to avoid is syncing the same objects in two different places; e.g., avoid
having Kustomizations that sync both the unmigrated and migrated application configuration.&lt;/p>
&lt;h3 id="installing-the-command-line-tool-flux">Installing the command-line tool &lt;code>flux&lt;/code>&lt;/h3>
&lt;p>The command-line tool &lt;code>flux&lt;/code> will be used below; see
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/get-started/#install-the-flux-cli">these instructions&lt;/a> for how to
install it.&lt;/p>
&lt;h2 id="running-the-automation-controllers">Running the automation controllers&lt;/h2>
&lt;p>The first thing to do is to deploy the automation controllers to your cluster. The best way to
proceed will depend on the approach you took when following the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/">Flux read-only migration
guide&lt;/a>.&lt;/p>
&lt;ul>
&lt;li>If you used &lt;code>flux bootstrap&lt;/code> to create a new Git repository, then ported your cluster
configuration to that repository, use
&lt;a href="#after-flux-bootstrap">After &lt;code>flux bootstrap&lt;/code>&lt;/a>;&lt;/li>
&lt;li>If you used &lt;code>flux install&lt;/code> to install the controllers directly, use
&lt;a href="#after-migrating-flux-v1-in-place">After migrating Flux v1 in
place&lt;/a>;&lt;/li>
&lt;li>If you used &lt;code>flux install&lt;/code> and exported the configuration to a file, use
&lt;a href="#after-committing-a-flux-v2-configuration-to-git">After committing Flux
v2 configuration to Git&lt;/a>.&lt;/li>
&lt;/ul>
&lt;h3 id="after-flux-bootstrap">After &lt;code>flux bootstrap&lt;/code>&lt;/h3>
&lt;p>When starting from scratch, you are likely to have used &lt;code>flux bootstrap&lt;/code>. Rerun the command, and
include the image automation controllers in your starting configuration with the flag
&lt;code>--components-extra&lt;/code>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/configuration/optional-components/">as shown in the installation guide&lt;/a>.&lt;/p>
&lt;p>This will commit changes to your Git repository and sync them in the cluster.&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>flux check --components-extra&lt;span style="color:#666">=&lt;/span>image-reflector-controller,image-automation-controller
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now jump to the section
&lt;a href="#migrating-each-manifest-to-flux-v2">Migrating each manifest to Flux v2&lt;/a>.&lt;/p>
&lt;h3 id="after-migrating-flux-v1-in-place">After migrating Flux v1 in place&lt;/h3>
&lt;p>If you followed the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/">Flux v1 migration guide&lt;/a>, you will already be running some
Flux v2 controllers. The automation controllers are currently considered an optional extra to those,
but are installed and run in much the same way. You may or may not have committed the Flux v2
configuration to your Git repository. If you did, go to the section
&lt;a href="#after-committing-a-flux-v2-configuration-to-git">After committing Flux v2
configuration to Git&lt;/a>.&lt;/p>
&lt;p>If &lt;em>not&lt;/em>, you will be installing directly to the cluster:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux install --components-extra&lt;span style="color:#666">=&lt;/span>image-reflector-controller,image-automation-controller
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>It is safe to repeat the installation command, or to run it after using &lt;code>flux bootstrap&lt;/code>, so long as
you repeat any arguments you supplied the first time.&lt;/p>
&lt;p>Now jump ahead to
&lt;a href="#migrating-each-manifest-to-flux-v2">Migrating each manifest to Flux v2&lt;/a>.&lt;/p>
&lt;h4 id="after-committing-a-flux-v2-configuration-to-git">After committing a Flux v2 configuration to Git&lt;/h4>
&lt;p>If you added the Flux v2 configuration to your git repository, assuming it&amp;rsquo;s in the file
&lt;code>$CLUSTER_PATH/flux-system/gotk-components.yaml&lt;/code> as used in the guide, use &lt;code>flux install&lt;/code> and write
it back to that file:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux install &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> --components-extra&lt;span style="color:#666">=&lt;/span>image-reflector-controller,image-automation-controller &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> --export &amp;gt; &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#bb60d5">$CLUSTER_PATH&lt;/span>&lt;span style="color:#4070a0">/flux-system/gotk-components.yaml&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Commit changes to the &lt;code>$CLUSTER_PATH/flux-system/gotk-components.yaml&lt;/code> file and sync the cluster:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ git add &lt;span style="color:#bb60d5">$CLUSTER_PATH&lt;/span>/flux-system/gotk-components.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -s -m &lt;span style="color:#4070a0">&amp;#34;Add image automation controllers to Flux config&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux reconcile kustomization --with-source flux-system
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="controlling-automation-with-an-imageupdateautomation-object">Controlling automation with an &lt;code>ImageUpdateAutomation&lt;/code> object&lt;/h2>
&lt;p>In Flux v1, automation was run by default. With Flux v2, you have to explicitly tell the controller
which Git repository to update and how to do so. These are defined in an &lt;code>ImageUpdateAutomation&lt;/code>
object; but first, you need a &lt;code>GitRepository&lt;/code> with write access, for the automation to use.&lt;/p>
&lt;p>If you followed the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/">Flux v1 read-only migration guide&lt;/a>, you will have a
&lt;code>GitRepository&lt;/code> defined in the namespace &lt;code>flux-system&lt;/code>, for syncing to use. This &lt;code>GitRepository&lt;/code>
will have &lt;em>read&lt;/em> access to the Git repository by default, and automation needs &lt;em>write&lt;/em> access to
push commits.&lt;/p>
&lt;p>To give it write access, you can replace the secret it refers to. How to do this will depend on what
kind of authentication you used to install Flux v2.&lt;/p>
&lt;h3 id="replacing-the-git-credentials-secret">Replacing the Git credentials secret&lt;/h3>
&lt;p>The secret with Git credentials will be named in the &lt;code>.spec.secretRef.name&lt;/code> field of the
&lt;code>GitRepository&lt;/code> object. Say your &lt;code>GitRepository&lt;/code> is in the &lt;em>namespace&lt;/em> &lt;code>flux-system&lt;/code> and &lt;em>named&lt;/em>
&lt;code>flux-system&lt;/code> (these are the defaults if you used &lt;code>flux bootstrap&lt;/code>); you can retrieve the secret
name and Git URL with:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">FLUX_NS&lt;/span>&lt;span style="color:#666">=&lt;/span>flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">GIT_NAME&lt;/span>&lt;span style="color:#666">=&lt;/span>flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">SECRET_NAME&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>kubectl -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> get gitrepository &lt;span style="color:#bb60d5">$GIT_NAME&lt;/span> -o &lt;span style="color:#bb60d5">jsonpath&lt;/span>&lt;span style="color:#666">={&lt;/span>.spec.secretRef.name&lt;span style="color:#666">}&lt;/span>&lt;span style="color:#007020;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#bb60d5">GIT_URL&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>kubectl -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> get gitrepository &lt;span style="color:#bb60d5">$GIT_NAME&lt;/span> -o &lt;span style="color:#bb60d5">jsonpath&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#39;{.spec.url}&amp;#39;&lt;/span>&lt;span style="color:#007020;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#007020">echo&lt;/span> &lt;span style="color:#bb60d5">$SECRET_NAME&lt;/span> &lt;span style="color:#bb60d5">$GIT_URL&lt;/span> &lt;span style="color:#60a0b0;font-style:italic"># make sure they have values&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you&amp;rsquo;re not sure which kind of credentials you&amp;rsquo;re using, look at the secret:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ kubectl -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> describe secret &lt;span style="color:#bb60d5">$SECRET_NAME&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>An entry at &lt;code>.data.identity&lt;/code> indicates that you are using an SSH key (the
&lt;a href="#replacing-an-ssh-key-secret">first
section&lt;/a> below); an entry at &lt;code>.data.username&lt;/code> indicates you are using
a username and password or token (the
&lt;a href="#replacing-a-usernamepassword-secret">second section&lt;/a>
below).&lt;/p>
&lt;h4 id="replacing-an-ssh-key-secret">Replacing an SSH key secret&lt;/h4>
&lt;p>When using an SSH (deploy) key, create a new key:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux create secret git -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> &lt;span style="color:#bb60d5">$SECRET_NAME&lt;/span> --url&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">$GIT_URL&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You will need to copy the public key that&amp;rsquo;s printed out, and install that as a deploy key for your
Git repo &lt;strong>making sure to check the &amp;lsquo;All write access&amp;rsquo; box&lt;/strong> (or otherwise give the key write
permissions). Remove the old deploy key.&lt;/p>
&lt;h4 id="replacing-a-usernamepassword-secret">Replacing a username/password secret&lt;/h4>
&lt;p>When you&amp;rsquo;re using a username and password to authenticate, you may be able to change the permissions
associated with that account.&lt;/p>
&lt;p>If not, you will need to create a new access token (e.g.,
&lt;a href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token" target="_blank">&amp;ldquo;Personal Access Token&amp;rdquo;&lt;/a> in
GitHub). In this case, once you have the new token you can replace the secret with the following:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux create secret git -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> &lt;span style="color:#bb60d5">$SECRET_NAME&lt;/span> &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> --username &amp;lt;username&amp;gt; --password &amp;lt;token&amp;gt; --url &lt;span style="color:#bb60d5">$GIT_URL&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="checking-the-new-credentials">Checking the new credentials&lt;/h4>
&lt;p>To check if your replaced credentials still work, try syncing the &lt;code>GitRepository&lt;/code> object:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux reconcile &lt;span style="color:#007020">source&lt;/span> git -n &lt;span style="color:#bb60d5">$FLUX_NS&lt;/span> &lt;span style="color:#bb60d5">$GIT_NAME&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating GitRepository flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> GitRepository reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ fetched revision main@sha1:d537304e8f5f41f1584ca1e807df5b5752b2577e
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When this is successful, it tells you the new credentials have at least read access.&lt;/p>
&lt;h3 id="making-an-automation-object">Making an automation object&lt;/h3>
&lt;p>To set automation running, you create an
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/image/imageupdateautomations/">&lt;code>ImageUpdateAutomation&lt;/code>&lt;/a> object. Each object
will update a Git repository, according to the image policies in the namespace.&lt;/p>
&lt;p>Here is an &lt;code>ImageUpdateAutomation&lt;/code> manifest for the example (note: you will have to supply your own
value for at least the host part of the email address):&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:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># the environment variables $AUTO_PATH and $GIT_NAME are set above&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>$ FLUXBOT_EMAIL=fluxbot@example.com&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># supply your own host or address here&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>$ flux create image update my-app-auto \&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>--author-name FluxBot --author-email &amp;#34;$FLUXBOT_EMAIL&amp;#34; \&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>--git-repo-ref $GIT_NAME \&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>--checkout-branch main \&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>--push-branch main \&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>--interval 30m \&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>--export &amp;gt; ./$AUTO_PATH/my-app-auto.yaml&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>$ cat my-app-auto.yaml&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:#0e84b5;font-weight:bold">---&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>image.toolkit.fluxcd.io/v1&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>ImageUpdateAutomation&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">metadata&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>my-app-auto&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&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">spec&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>30m&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">sourceRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&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>flux-system&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">git&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">checkout&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">ref&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">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&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">commit&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">author&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">email&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>fluxbot@example.com&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>FluxBot&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="commit-and-check-that-the-automation-object-works">Commit and check that the automation object works&lt;/h4>
&lt;p>Commit the manifeat file and push:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ git add ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/my-app-auto.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -s -m &lt;span style="color:#4070a0">&amp;#34;Add image update automation&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># ...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then sync and check the object status:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux reconcile kustomization --with-source flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating GitRepository flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> GitRepository reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ fetched revision main@sha1:401dd3b550f82581c7d12bb79ade389089c6422f
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating Kustomization flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> Kustomization reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ reconciled revision main@sha1:401dd3b550f82581c7d12bb79ade389089c6422f
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux get image update
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME LAST RUN SUSPENDED READY MESSAGE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>my-app-auto 2021-02-08T14:53:43Z False True repository up-to-date
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Read on to the next section to see how to change each manifest file to work with Flux v2.&lt;/p>
&lt;h2 id="migrating-each-manifest-to-flux-v2">Migrating each manifest to Flux v2&lt;/h2>
&lt;p>In Flux v1, the annotation&lt;/p>
&lt;pre>&lt;code>fluxcd.io/automated: &amp;quot;true&amp;quot;
&lt;/code>&lt;/pre>
&lt;p>switches automation on for a manifest (a description of a Kubernetes object). For each manifest that
has that annotation, you will need to create custom resources to scan for the latest image, and to
replace the annotations with field markers.&lt;/p>
&lt;p>The following sections explain these steps, using this example Deployment manifest which is
initially annotated to work with Flux v1:&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&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>Deployment&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">metadata&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>my-app&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">annotations&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">fluxcd.io/automated&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;true&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">fluxcd.io/tag.app&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>semver:^5.0&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">spec&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">template&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">spec&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">containers&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>app&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo:5.0.0&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-warning" role="alert">
A YAML file may have more than one manifest in it, separated with
&lt;code>---&lt;/code>. Be careful to account for each manifest in a file.
&lt;/div>
&lt;p>You may wish to try migrating the automation of just one file or manifest and follow it through to
the end of the guide, before returning here to do the remainder.&lt;/p>
&lt;h3 id="how-to-migrate-annotations-to-image-policies">How to migrate annotations to image policies&lt;/h3>
&lt;p>For each image repository that is the subject of automation you will need to create an
&lt;code>ImageRepository&lt;/code> object, so that the image repository is scanned for tags. The image repository in
the example deployment is &lt;code>ghcr.io/stefanprodan/podinfo&lt;/code>, which is the image reference minus its
tag:&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>$ cat $CLUSTER_PATH/app/my-app.yaml&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>apps/v1&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>Deployment&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">metadata&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>my-app&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">annotations&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">fluxcd.io/automated&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;true&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">fluxcd.io/tag.app&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>semver:^5.0&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">spec&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">template&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">spec&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">containers&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>app&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo:5.0.0&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># &amp;lt;-- image reference&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The command-line tool &lt;code>flux&lt;/code> will help create a manifest for you. Note that the output is redirected
to a file under &lt;code>$AUTO_PATH&lt;/code>, so it can be added to the Git repository and synced to the cluster.&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#60a0b0;font-style:italic"># the environment variable $AUTO_PATH was set earlier&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux create image repository podinfo-image &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> --image ghcr.io/stefanprodan/podinfo &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> --interval 5m &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> --export &amp;gt; ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/podinfo-image.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ cat ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/podinfo-image.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apiVersion: image.toolkit.fluxcd.io/v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kind: ImageRepository
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadata:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: podinfo-image
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> namespace: flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>spec:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> image: ghcr.io/stefanprodan/podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> interval: 5m0s
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>
If you are using the same image repository in several manifests, you only need one
&lt;code>ImageRepository&lt;/code> object for it.
&lt;/div>
&lt;h5 id="using-image-registry-credentials-for-scanning">Using image registry credentials for scanning&lt;/h5>
&lt;p>When your image repositories are private, you supply Kubernetes with &amp;ldquo;image pull secrets&amp;rdquo; with
credentials for accessing the image registry (e.g., DockerHub). The image reflector controller needs
the same kind of credentials to scan image repositories.&lt;/p>
&lt;p>There are several ways that image pull secrets can be made available for the image reflector
controller. The
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/#configure-image-scanning">image update tutorial&lt;/a> describes how to create or arrange
secrets for scanning to use. Also see later in the tutorial for
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/#imagerepository-cloud-providers-authentication">instructions specific to some cloud
platforms&lt;/a>.&lt;/p>
&lt;h5 id="committing-and-checking-the-imagerepository">Committing and checking the ImageRepository&lt;/h5>
&lt;p>Add the &lt;code>ImageRepository&lt;/code> manifest to the Git index and commit it:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ git add ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/podinfo-image.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -s -m &lt;span style="color:#4070a0">&amp;#34;Add image repository object for podinfo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># ...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now you can sync the new commit, and check that the object is working:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux reconcile kustomization --with-source flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating GitRepository flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> GitRepository reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ fetched revision main@sha1:fd2fe8a61d4537bcfa349e4d1dbc480ea699ba8a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating Kustomization flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> Kustomization reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ reconciled revision main@sha1:fd2fe8a61d4537bcfa349e4d1dbc480ea699ba8a
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux get image repository podinfo-image
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME READY MESSAGE LAST SCAN SUSPENDED
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>podinfo-image True successful scan, found &lt;span style="color:#40a070">16&lt;/span> tags 2021-02-08T14:31:38Z False
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="replacing-automation-annotations">Replacing automation annotations&lt;/h4>
&lt;p>For each &lt;em>field&lt;/em> that&amp;rsquo;s being updated by automation, you&amp;rsquo;ll need an &lt;code>ImagePolicy&lt;/code> object to describe
how to select an image for the field value. In the example, the field &lt;code>.image&lt;/code> in the container
named &lt;code>&amp;quot;app&amp;quot;&lt;/code> is the field being updated.&lt;/p>
&lt;p>In Flux v1, annotations describe how to select the image to update to, using a prefix. In the
example, the prefix is &lt;code>semver:&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">annotations&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">fluxcd.io/automated&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;true&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">fluxcd.io/tag.app&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>semver:^5.0&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>These are the prefixes supported in Flux v1, and what to use in Flux v2:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Flux v1 prefix&lt;/th>
&lt;th>Meaning&lt;/th>
&lt;th>Flux v2 equivalent&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>glob:&lt;/code>&lt;/td>
&lt;td>Filter for tags matching the glob pattern, then select the newest by build time&lt;/td>
&lt;td>
&lt;a href="#how-to-use-sortable-image-tags">Use sortable tags&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>regex:&lt;/code>&lt;/td>
&lt;td>Filter for tags matching the regular expression, then select the newest by build time&lt;/td>
&lt;td>
&lt;a href="#how-to-use-sortable-image-tags">Use sortable tags&lt;/a>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>semver:&lt;/code>&lt;/td>
&lt;td>Filter for tags that represent versions, and select the highest version in the given range&lt;/td>
&lt;td>
&lt;a href="#how-to-use-semver-image-tags">Use semver ordering&lt;/a>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="how-to-use-sortable-image-tags">How to use sortable image tags&lt;/h4>
&lt;p>To give image tags a useful ordering, you can use a timestamp or serial number as part of each
image&amp;rsquo;s tag, then sort either alphabetically or numerically.&lt;/p>
&lt;p>This is a change from Flux v1, in which the build time was fetched from each image&amp;rsquo;s config, and
didn&amp;rsquo;t need to be included in the image tag. Therefore, this is likely to require a change to your
build process.&lt;/p>
&lt;p>The guide
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/sortable-image-tags/">How to make sortable image tags&lt;/a> explains how to change your build
process to tag images with a timestamp. This will mean Flux v2 can sort the tags to find the most
recently built image.&lt;/p>
&lt;h5 id="filtering-the-tags-in-an-imagepolicy">Filtering the tags in an &lt;code>ImagePolicy&lt;/code>&lt;/h5>
&lt;p>The recommended format for image tags using a timestamp is:&lt;/p>
&lt;pre>&lt;code>&amp;lt;branch&amp;gt;-&amp;lt;sha1&amp;gt;-&amp;lt;timestamp&amp;gt;
&lt;/code>&lt;/pre>
&lt;p>The timestamp (or serial number) is the part of the tag that you want to order on. The SHA1 is there
so you can trace an image back to the commit from which it was built. You don&amp;rsquo;t need the branch for
sorting, but you may want to include only builds from a specific branch.&lt;/p>
&lt;p>Say you want to filter for only images that are from &lt;code>main&lt;/code> branch, and pick the most recent. Your
&lt;code>ImagePolicy&lt;/code> would look like this:&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&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>ImagePolicy&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">metadata&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>my-app-policy&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&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">spec&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">imageRepositoryRef&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>podinfo-image&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">filterTags&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">pattern&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;^main-[a-f0-9]+-(?P&amp;lt;ts&amp;gt;[0-9]+)&amp;#39;&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">extract&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;$ts&amp;#39;&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">policy&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">numerical&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">order&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>asc&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>.spec.filterTags.pattern&lt;/code> field gives a regular expression that a tag must match to be included. The
&lt;code>.spec.filterTags.extract&lt;/code> field gives a replacement pattern that can refer back to capture groups in the
filter pattern. The extracted values are sorted to find the selected image tag. In this case, the
timestamp part of the tag will be extracted and sorted numerically in ascending order. See
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/image/imagepolicies/">the
reference docs&lt;/a> for more examples.&lt;/p>
&lt;p>Once you have made sure you have image tags and an &lt;code>ImagePolicy&lt;/code>, jump ahead to
&lt;a href="#checking-that-the-imagepolicy-works">Checking
the ImagePolicy works&lt;/a>.&lt;/p>
&lt;h3 id="how-to-use-semver-image-tags">How to use SemVer image tags&lt;/h3>
&lt;p>The other kind of sorting is by
&lt;a href="https://semver.org" target="_blank">SemVer&lt;/a>, picking the highest version from among those
included by the filter. A semver range will also filter for tags that fit in the range. For example,&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:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&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">range&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>^5.0&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>includes only tags that have a major version of &lt;code>5&lt;/code>, and selects whichever is the highest.&lt;/p>
&lt;p>This can be combined with a regular expression pattern, to filter on other parts of the tags. For
example, you might put a target environment as well as the version in your image tags, like
&lt;code>dev-v1.0.3&lt;/code>.&lt;/p>
&lt;p>Then you would use an &lt;code>ImagePolicy&lt;/code> similar to this one:&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&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>ImagePolicy&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">metadata&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>my-app-policy&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-system&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">spec&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">imageRepositoryRef&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>podinfo-image&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">filterTags&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">pattern&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;^dev-v(?P&amp;lt;version&amp;gt;.*)&amp;#39;&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">extract&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;$version&amp;#39;&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">policy&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">range&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;^1.0&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Continue on to the next sections to see an example, and how to check that your &lt;code>ImagePolicy&lt;/code> works.&lt;/p>
&lt;h4 id="an-imagepolicy-for-the-example">An &lt;code>ImagePolicy&lt;/code> for the example&lt;/h4>
&lt;p>The example Deployment has annotations using &lt;code>semver:&lt;/code> as a prefix, so the policy object also uses
semver:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#60a0b0;font-style:italic"># the environment variable $AUTO_PATH was set earlier&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux create image policy my-app-policy &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> --image-ref podinfo-image &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> --semver &lt;span style="color:#4070a0">&amp;#39;^5.0&amp;#39;&lt;/span> &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> --export &amp;gt; ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/my-app-policy.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ cat ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/my-app-policy.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apiVersion: image.toolkit.fluxcd.io/v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kind: ImagePolicy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadata:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: my-app-policy
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> namespace: flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>spec:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> imageRepositoryRef:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: podinfo-image
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> policy:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> semver:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> range: ^5.0
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="checking-that-the-imagepolicy-works">Checking that the &lt;code>ImagePolicy&lt;/code> works&lt;/h4>
&lt;p>Commit the manifest file, and push:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ git add ./&lt;span style="color:#bb60d5">$AUTO_PATH&lt;/span>/my-app-policy.yaml
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -s -m &lt;span style="color:#4070a0">&amp;#34;Add image policy for my-app&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># ...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then you can reconcile and check that the image policy works:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux reconcile kustomization --with-source flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating GitRepository flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> GitRepository reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ GitRepository reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ fetched revision main@sha1:7dcf50222499be8c97e22cd37e26bbcda8f70b95
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating Kustomization flux-system in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> Kustomization reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ Kustomization reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ reconciled revision main@sha1:7dcf50222499be8c97e22cd37e26bbcda8f70b95
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux get image policy flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>NAME READY MESSAGE LATEST IMAGE
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>my-app-policy True Latest image tag &lt;span style="color:#007020;font-weight:bold">for&lt;/span> &lt;span style="color:#4070a0">&amp;#39;ghcr.io/stefanprodan/podinfo&amp;#39;&lt;/span> resolved to: 5.1.4 ghcr.io/stefanprodan/podinfo:5.1.4
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="how-to-mark-up-files-for-update">How to mark up files for update&lt;/h3>
&lt;p>The last thing to do in each manifest is to mark the fields that you want to be updated.&lt;/p>
&lt;p>In Flux v1, the annotations in a manifest determines the fields to be updated. In the example, the
annotations target the image used by the container &lt;code>app&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&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>Deployment&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">metadata&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>my-app&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">annotations&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">fluxcd.io/automated&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;true&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">fluxcd.io/tag.app&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>semver:^5.0&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># &amp;lt;-- `.app` here&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">spec&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">template&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">spec&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">containers&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>app &lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># &amp;lt;-- targets `app` here&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo:5.0.0&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This works straight-forwardly for Deployment manifests, but when it comes to &lt;code>HelmRelease&lt;/code>
manifests, doesn&amp;rsquo;t work at all for many kinds of resources.&lt;/p>
&lt;p>For Flux v2, you mark the field you want to be updated directly, with the namespaced name of the
image policy to apply. This is the example Deployment, marked up for Flux v2:&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&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>Deployment&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">metadata&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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>my-app&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">spec&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">template&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">spec&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">containers&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>app&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo:5.0.0&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:my-app-policy&amp;#34;}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The value &lt;code>flux-system:my-app-policy&lt;/code> names the policy that selects the desired image.&lt;/p>
&lt;p>This works in the same way for &lt;code>DaemonSet&lt;/code> and &lt;code>CronJob&lt;/code> manifests. For &lt;code>HelmRelease&lt;/code> manifests, put
the marker alongside the part of the &lt;code>values&lt;/code> that has the image tag. If the image tag is a separate
field, you can put &lt;code>:tag&lt;/code> on the end of the name, to replace the value with just the selected
image&amp;rsquo;s tag. The
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/#configure-image-update-for-custom-resources">image automation guide&lt;/a> has examples for &lt;code>HelmRelease&lt;/code>
and other custom resources.&lt;/p>
&lt;h3 id="committing-the-marker-change-and-checking-that-automation-works">Committing the marker change and checking that automation works&lt;/h3>
&lt;p>Referring to the image policy created earlier, you can see the example Deployment does not use the
most recent image. When you commit the manifest file with the update marker added, you would expect
automation to update the file.&lt;/p>
&lt;p>Commit the change that adds an update marker:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ git add app/my-app.yaml &lt;span style="color:#60a0b0;font-style:italic"># the filename of the example&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -s -m &lt;span style="color:#4070a0">&amp;#34;Add update marker to my-app manifest&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># ...&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now to check that the automation makes a change:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ flux reconcile image update my-app-auto
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>► annotating ImageUpdateAutomation my-app-auto in flux-system namespace
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ ImageUpdateAutomation annotated
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>◎ waiting &lt;span style="color:#007020;font-weight:bold">for&lt;/span> ImageUpdateAutomation reconciliation
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ ImageUpdateAutomation reconciliation completed
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>✔ committed and pushed a92a4b654f520c00cb6c46b2d5e4fb4861aa58fc
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="troubleshooting">Troubleshooting&lt;/h2>
&lt;p>If a change was not pushed by the image automation, there&amp;rsquo;s several things you can check:&lt;/p>
&lt;ul>
&lt;li>it&amp;rsquo;s possible it made a change that is not reported in the latest status &amp;ndash; pull from the origin
and check the commit log&lt;/li>
&lt;li>check that the name used in the marker corresponds to the namespace and name of an &lt;code>ImagePolicy&lt;/code>&lt;/li>
&lt;li>check that the &lt;code>ImageUpdateAutomation&lt;/code> is in the same namespace as the &lt;code>ImagePolicy&lt;/code> objects
named in markers&lt;/li>
&lt;li>check that the image policy and the image repository are both reported as &lt;code>Ready&lt;/code>&lt;/li>
&lt;li>check that the credentials referenced by the &lt;code>GitRepository&lt;/code> object have write permission, and
create new credentials if necessary.&lt;/li>
&lt;/ul>
&lt;p>As a fallback, you can scan the logs of the automation controller to see if it logged errors:&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-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ kubectl logs -n flux-system deploy/image-automation-controller
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Once you are satisfied that it is working, you can migrate the rest of the manifests using the steps
from
&lt;a href="#migrating-each-manifest-to-flux-v2">&amp;ldquo;Migrating each manifest to Flux v2&amp;rdquo;&lt;/a> above.&lt;/p></description></item><item><title>Flux: Migrate to the Helm Controller</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/helm-operator-migration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/helm-operator-migration/</guid><description>
&lt;p>This guide will learn you everything you need to know to be able to migrate from the
&lt;a href="https://github.com/fluxcd/helm-operator" target="_blank">Helm Operator&lt;/a> to the
&lt;a href="https://github.com/fluxcd/helm-controller" target="_blank">Helm Controller&lt;/a>.&lt;/p>
&lt;h2 id="overview-of-changes">Overview of changes&lt;/h2>
&lt;h3 id="support-for-helm-v2-dropped">Support for Helm v2 dropped&lt;/h3>
&lt;p>The Helm Operator offered support for both Helm v2 and v3, due to Kubernetes client incompatibility issues between the versions. This has blocked the Helm Operator from being able to upgrade to a newer v3 version since the release of &lt;code>3.2.0&lt;/code>.&lt;/p>
&lt;p>In combination with the fact that
&lt;a href="https://helm.sh/blog/helm-v2-deprecation-timeline/" target="_blank">Helm v2 reaches end of life after November 13, 2020&lt;/a>, support for Helm v2 has been dropped.&lt;/p>
&lt;h3 id="helm-and-git-repositories-and-even-helm-charts-are-now-custom-resources">Helm and Git repositories, and even Helm charts are now Custom Resources&lt;/h3>
&lt;p>When working with the Helm Operator, you had to mount various files to either make it recognize new (private) Helm repositories or make it gain access to Helm and/or Git repositories. While this approach was declarative, it did not provide a great user experience and was at times hard to set up.&lt;/p>
&lt;p>By moving this configuration to
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmrepositories/">&lt;code>HelmRepository&lt;/code>&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/gitrepositories/">&lt;code>GitRepository&lt;/code>&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/buckets/">&lt;code>Bucket&lt;/code>&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmcharts/">&lt;code>HelmChart&lt;/code>&lt;/a> Custom Resources, they can now be declaratively described (including their credentials using references to &lt;code>Secret&lt;/code> resources), and applied to the cluster.&lt;/p>
&lt;p>The reconciliation of these resources has been offloaded to a dedicated
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/">Source Controller&lt;/a>, specialized in the acquisition of artifacts from external sources.&lt;/p>
&lt;p>The result of this all is an easier and more flexible configuration, with much better observability. Failures are traceable to the level of the resource that lead to a failure, and are easier to resolve. As polling intervals can now be configured per resource, you can customize your repository and/or chart configuration to a much finer grain.&lt;/p>
&lt;p>From a technical perspective, this also means less overhead, as the resources managed by the Source Controller can be shared between multiple &lt;code>HelmRelease&lt;/code> resources, or even reused by other controllers like the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/kustomize/">Kustomize Controller&lt;/a>.&lt;/p>
&lt;h3 id="the-helmrelease-custom-resource-group-domain-changed">The &lt;code>HelmRelease&lt;/code> Custom Resource group domain changed&lt;/h3>
&lt;p>Due to the Helm Controller becoming part of the extensive set of controller components Flux now has, the Custom Resource group domain has changed from &lt;code>helm.fluxcd.io&lt;/code> to &lt;code>helm.toolkit.fluxcd.io&lt;/code>.&lt;/p>
&lt;p>Together with the new API version (&lt;code>v2&lt;/code> at time of writing), the full &lt;code>apiVersion&lt;/code> you use in your YAML document becomes &lt;code>helm.toolkit.fluxcd.io/v2&lt;/code>.&lt;/p>
&lt;h3 id="the-api-specification-changed-quite-a-lot-for-the-better">The API specification changed (quite a lot), for the better&lt;/h3>
&lt;p>While developing the Helm Controller, we were given the chance to rethink what a declarative API for driving automated Helm releases would look like. This has, in short, resulted in the following changes:&lt;/p>
&lt;ul>
&lt;li>Extensive configuration options per Helm action (install, upgrade, test, rollback); this includes things like timeouts, disabling hooks, and ignoring failures for tests.&lt;/li>
&lt;li>Strategy-based remediation on failures. This makes it possible, for example, to uninstall a release instead of rolling it back after a failed upgrade. The number of retries or keeping the last failed state when the retries are exhausted is now a configurable option.&lt;/li>
&lt;li>Better observability. The &lt;code>Status&lt;/code> field in the &lt;code>HelmRelease&lt;/code> provides a much better view of the current state of the release, including dedicated &lt;code>Ready&lt;/code>, &lt;code>Released&lt;/code>, &lt;code>TestSuccess&lt;/code>, and &lt;code>Remediated&lt;/code> conditions.&lt;/li>
&lt;/ul>
&lt;p>For a comprehensive overview, see the
&lt;a href="#api-spec-changes">API spec changes&lt;/a>.&lt;/p>
&lt;h3 id="helm-storage-drift-detection-no-longer-relies-on-dry-runs">Helm storage drift detection no longer relies on dry-runs&lt;/h3>
&lt;p>The Helm Controller no longer uses dry-runs as a way to detect mutations to the Helm storage. Instead, it uses a simpler model of bookkeeping based on the observed state and revisions. This has resulted in much better performance, a lower memory and CPU footprint, and more reliable drift detection.&lt;/p>
&lt;h3 id="no-longer-supports-helm-downloader-pluginshttpshelmshdocstopicspluginsdownloader-plugins">No longer supports
&lt;a href="https://helm.sh/docs/topics/plugins/#downloader-plugins" target="_blank">Helm downloader plugins&lt;/a>&lt;/h3>
&lt;p>We have reduced our usage of Helm packages to a bare minimum (that being: as much as we need to be able to work with chart repositories and charts), and are avoiding shell outs as much as we can.&lt;/p>
&lt;p>Given the latter, and the fact that Helm (downloader) plugins work based on shelling out to another command and/or binary, support for this had to be dropped.&lt;/p>
&lt;p>We are aware some of our users are using this functionality to be able to retrieve charts from S3 or GCS. The Source Controller already has support for S3 storage compatible buckets (
&lt;a href="https://cloud.google.com/storage/docs/interoperability" target="_blank">this includes GCS&lt;/a>), and we hope to extend this support in the foreseeable future to be on par with the plugins that offered support for these Helm repository types.&lt;/p>
&lt;h3 id="values-from-configmap-and-secret-resources-in-other-namespaces-are-no-longer-supported">Values from &lt;code>ConfigMap&lt;/code> and &lt;code>Secret&lt;/code> resources in other namespaces are no longer supported&lt;/h3>
&lt;p>Support for values references to &lt;code>ConfigMap&lt;/code> and &lt;code>Secret&lt;/code> resources in other namespaces than the namespace of the &lt;code>HelmRelease&lt;/code> has been dropped, as this allowed information from other namespaces to leak into the composed values for the Helm release.&lt;/p>
&lt;h3 id="values-from-external-source-references-urls-are-no-longer-supported">Values from external source references (URLs) are no longer supported&lt;/h3>
&lt;p>We initially introduced this feature to support alternative (production focused) &lt;code>values.yaml&lt;/code> files that sometimes come with charts. It was also used by users to use generic and/or dynamic &lt;code>values.yaml&lt;/code> files in their &lt;code>HelmRelease&lt;/code> resources.&lt;/p>
&lt;p>The former can now be achieved by defining a
&lt;a href="#chart-file-references">&lt;code>ValuesFiles&lt;/code> overwrite in the &lt;code>HelmChartTemplateSpec&lt;/code>&lt;/a>, which will make the Source Controller look for the referenced file in the chart, and overwrite the default values with the contents from that file.&lt;/p>
&lt;p>Support for the latter use has been dropped, as it goes against the principles of GitOps and declarative configuration. You can not reliably restore the cluster state from a Git repository if the configuration of a service relies on some URL being available.&lt;/p>
&lt;p>Getting similar behaviour is still possible
&lt;a href="#external-source-references">using a workaround that makes use of a &lt;code>CronJob&lt;/code> to download the contents of the external URL on an interval&lt;/a>.&lt;/p>
&lt;h3 id="you-can-now-merge-single-values-at-a-given-path">You can now merge single values at a given path&lt;/h3>
&lt;p>There was a long outstanding request for the Helm Operator to support merging single values at a given path.&lt;/p>
&lt;p>With the Helm Controller this now possible by defining a
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.ValuesReference">&lt;code>targetPath&lt;/code> in the &lt;code>ValuesReference&lt;/code>&lt;/a>, which supports the same formatting as you would supply as an argument to the &lt;code>helm&lt;/code> binary using &lt;code>--set [path]=[value]&lt;/code>. In addition to this, the referred value can contain the same value formats (e.g. &lt;code>{a,b,c}&lt;/code> for a list). You can read more about the available formats and limitations in the
&lt;a href="https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of---set" target="_blank">Helm documentation&lt;/a>.&lt;/p>
&lt;h3 id="support-added-for-depends-on-relationships">Support added for depends-on relationships&lt;/h3>
&lt;p>We have added support for depends-on relationships to install &lt;code>HelmRelease&lt;/code> resources in a given order; for example, because a chart relies on the presence of a Custom Resource Definition installed by another &lt;code>HelmRelease&lt;/code> resource.&lt;/p>
&lt;p>Entries defined in the &lt;code>spec.dependsOn&lt;/code> list of the &lt;code>HelmRelease&lt;/code> must be in a &lt;code>Ready&lt;/code> state before the Helm Controller proceeds with installation and/or upgrade actions.&lt;/p>
&lt;p>Note that this does not account for upgrade ordering. Kubernetes only allows applying one resource (&lt;code>HelmRelease&lt;/code> in this case) at a time, so there is no way for the controller to know when a dependency &lt;code>HelmRelease&lt;/code> may be updated.&lt;/p>
&lt;p>Also, circular dependencies between &lt;code>HelmRelease&lt;/code> resources must be avoided, otherwise the interdependent &lt;code>HelmRelease&lt;/code> resources will never be reconciled.&lt;/p>
&lt;h3 id="you-can-now-suspend-a-helmrelease">You can now suspend a HelmRelease&lt;/h3>
&lt;p>There is a new &lt;code>spec.suspend&lt;/code> field, that if set to &lt;code>true&lt;/code> causes the Helm Controller to skip reconciliation for the resource. This can be utilized to e.g. temporarily ignore chart changes, and prevent a Helm release from getting upgraded.&lt;/p>
&lt;h3 id="helm-releases-can-target-another-cluster">Helm releases can target another cluster&lt;/h3>
&lt;p>We have added support for making Helm releases to other clusters. If the &lt;code>spec.kubeConfig&lt;/code> field in the &lt;code>HelmRelease&lt;/code> is set, Helm actions will run against the default cluster specified in that KubeConfig instead of the local cluster that is responsible for the reconciliation of the &lt;code>HelmRelease&lt;/code>.&lt;/p>
&lt;p>The Helm storage is stored on the remote cluster in a namespace that equals to the namespace of the &lt;code>HelmRelease&lt;/code>, or the configured &lt;code>spec.storageNamespace&lt;/code>. The release itself is made in a namespace that equals to the namespace of the &lt;code>HelmRelease&lt;/code>, or the configured &lt;code>spec.targetNamespace&lt;/code>. The namespaces are expected to exist, and can for example be created using the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/kustomize/">Kustomize Controller&lt;/a> which has the same cross-cluster support.
Other references to Kubernetes resources in the &lt;code>HelmRelease&lt;/code>, like &lt;code>ValuesReference&lt;/code> resources, are expected to exist on the reconciling cluster.&lt;/p>
&lt;h3 id="added-support-for-notifications-and-webhooks">Added support for notifications and webhooks&lt;/h3>
&lt;p>Sending notifications and/or alerts to Slack, Microsoft Teams, Discord, or Rocker is now possible using the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/">Notification Controller&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/provider/">&lt;code>Provider&lt;/code> Custom Resources&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/alert/">&lt;code>Alert&lt;/code> Custom Resources&lt;/a>.&lt;/p>
&lt;p>It does not stop there, using
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/notification/receiver/">&lt;code>Receiver&lt;/code> Custom Resources&lt;/a> you can trigger &lt;strong>push based&lt;/strong> reconciliations from Harbor, GitHub, GitLab, BitBucket or your CI system by making use of the webhook endpoint the resource creates.&lt;/p>
&lt;h3 id="introduction-of-the-flux-cli-to-create-andor-generate-custom-resources">Introduction of the &lt;code>flux&lt;/code> CLI to create and/or generate Custom Resources&lt;/h3>
&lt;p>With the new
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/cmd/flux/">&lt;code>flux&lt;/code> CLI&lt;/a> it is now possible to create and/or generate the Custom Resources mentioned earlier. To generate the YAML for a &lt;code>HelmRepository&lt;/code> and &lt;code>HelmRelease&lt;/code> resource, you can for example run:&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>$ flux create &lt;span style="color:#007020">source&lt;/span> helm podinfo &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> --url&lt;span style="color:#666">=&lt;/span>https://stefanprodan.github.io/podinfo &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> --interval&lt;span style="color:#666">=&lt;/span>10m &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> --export
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apiVersion: source.toolkit.fluxcd.io/v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kind: HelmRepository
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadata:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> namespace: flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>spec:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> interval: 10m0s
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> url: https://stefanprodan.github.io/podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flux create helmrelease podinfo &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> --interval&lt;span style="color:#666">=&lt;/span>10m &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> --source&lt;span style="color:#666">=&lt;/span>HelmRepository/podinfo &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> --chart&lt;span style="color:#666">=&lt;/span>podinfo &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> --chart-version&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;gt;4.0.0&amp;#34;&lt;/span> &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> --export
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>apiVersion: helm.toolkit.fluxcd.io/v2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kind: HelmRelease
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadata:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> namespace: flux-system
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>spec:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> chart:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> spec:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> chart: podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> sourceRef:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> kind: HelmRepository
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: podinfo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> version: &lt;span style="color:#4070a0">&amp;#39;&amp;gt;4.0.0&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> interval: 10m0s
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="api-spec-changes">API spec changes&lt;/h2>
&lt;p>The following is an overview of changes to the API spec, including behavioral changes compared to how the Helm Operator performs actions. For a full overview of the new API spec, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/helmreleases/#specification">API spec documentation&lt;/a>.&lt;/p>
&lt;h3 id="defining-the-helm-chart">Defining the Helm chart&lt;/h3>
&lt;h4 id="helm-repository">Helm repository&lt;/h4>
&lt;p>For the Helm Operator, you used to configure a chart from a Helm repository as follows:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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">chart&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:#60a0b0;font-style:italic"># The repository URL&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">repository&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://charts.example.com&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:#60a0b0;font-style:italic"># The name of the chart (without an alias)&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>my-chart&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:#60a0b0;font-style:italic"># The SemVer version of the chart&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">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1.2.3&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With the Helm Controller, you now create a &lt;code>HelmRepository&lt;/code> resource in addition to the &lt;code>HelmRelease&lt;/code> you would normally create (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.HelmRepository">Source API reference&lt;/a>):&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:#0e84b5;font-weight:bold">---&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>source.toolkit.fluxcd.io/v1&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>HelmRepository&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">metadata&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>my-repository&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># The interval at wich to check the upstream for updates&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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:#60a0b0;font-style:italic"># The repository URL, a valid URL contains at least a protocol and host&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">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://chart.example.com&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you make use of a private Helm repository, instead of configuring the credentials by mounting a &lt;code>repositories.yaml&lt;/code> file, you can now configure the HTTP/S basic auth and/or TLS credentials by referring to a &lt;code>Secret&lt;/code> in the same namespace as the &lt;code>HelmRepository&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">---&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>v1&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>Secret&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">metadata&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>my-repository-creds&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">data&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:#60a0b0;font-style:italic"># HTTP/S basic auth credentials&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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded username&amp;gt;&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">password&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded password&amp;gt;&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:#60a0b0;font-style:italic"># TLS credentials (certFile and keyFile, and/or caFile)&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">certFile&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded certificate&amp;gt;&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">keyFile&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded key&amp;gt;&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">caFile&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded CA certificate&amp;gt;&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:#0e84b5;font-weight:bold">---&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>source.toolkit.fluxcd.io/v1&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>HelmRepository&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">metadata&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>my-repository&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">secretRef&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>my-repository-creds&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the &lt;code>HelmRelease&lt;/code>, you then use a reference to the &lt;code>HelmRepository&lt;/code> resource in the &lt;code>spec.chart.spec&lt;/code> (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.HelmChartTemplate">Helm API reference&lt;/a>):&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># The interval at which to reconcile the Helm release&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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">chart&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">spec&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:#60a0b0;font-style:italic"># The name of the chart as made available by the HelmRepository&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:#60a0b0;font-style:italic"># (without any aliases)&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">chart&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-chart&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:#60a0b0;font-style:italic"># A fixed SemVer, or any SemVer range&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:#60a0b0;font-style:italic"># (i.e. &amp;gt;=4.0.0 &amp;lt;5.0.0)&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">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1.2.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:#60a0b0;font-style:italic"># The reference to the HelmRepository&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">sourceRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRepository&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>my-repository&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:#60a0b0;font-style:italic"># Optional, defaults to the namespace of the HelmRelease&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>spec.chart.spec&lt;/code> values are used by the Helm Controller as a template to create a new &lt;code>HelmChart&lt;/code> resource in the same namespace as the &lt;code>sourceRef&lt;/code>, to be reconciled by the Source Controller. The Helm Controller watches &lt;code>HelmChart&lt;/code> resources for (revision) changes, and performs an installation or upgrade when it notices a change.&lt;/p>
&lt;h4 id="git-repository">Git repository&lt;/h4>
&lt;p>For the Helm Operator, you used to configure a chart from a Git repository as follows:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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">chart&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:#60a0b0;font-style:italic"># The URL of the Git repository&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">git&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://example.com/org/repo&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:#60a0b0;font-style:italic"># The Git branch (or other Git reference)&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">ref&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>master&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:#60a0b0;font-style:italic"># The path of the chart relative to the repository root&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>./charts/my-chart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With the Helm Controller, you create a &lt;code>GitRepository&lt;/code> resource in addition to the &lt;code>HelmRelease&lt;/code> you would normally create (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/api/v1/#source.toolkit.fluxcd.io/v1.GitRepository">Source API reference&lt;/a>:&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:#0e84b5;font-weight:bold">---&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>source.toolkit.fluxcd.io/v1&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>GitRepository&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">metadata&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>my-repository&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># The interval at which to check the upstream for updates&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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:#60a0b0;font-style:italic"># The repository URL, can be a HTTP/S or SSH address&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">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://example.com/org/repo&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:#60a0b0;font-style:italic"># The Git reference to checkout and monitor for changes&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:#60a0b0;font-style:italic"># (defaults to master)&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:#60a0b0;font-style:italic"># For all available options, see:&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:#60a0b0;font-style:italic"># https://fluxcd.io/flux/components/source/api/v1#source.toolkit.fluxcd.io/v1.GitRepositoryRef&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">ref&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">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>master&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you make use of a private Git repository, instead of configuring the credentials by mounting a private key and making changes to the &lt;code>known_hosts&lt;/code> file, you can now configure the credentials for both HTTP/S and SSH by referring to a &lt;code>Secret&lt;/code> in the same namespace as the &lt;code>GitRepository&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">---&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>v1&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>Secret&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">metadata&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>my-repository-creds&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">data&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:#60a0b0;font-style:italic"># HTTP/S basic auth credentials&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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded username&amp;gt;&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">password&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded password&amp;gt;&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:#60a0b0;font-style:italic"># SSH credentials&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">identity&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded private key&amp;gt;&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">identity.pub&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 public key&amp;gt;&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">known_hosts&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64 encoded known_hosts&amp;gt;&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:#0e84b5;font-weight:bold">---&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>source.toolkit.fluxcd.io/v1&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>GitRepository&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">metadata&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>my-repository&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">secretRef&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>my-repository-creds&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the &lt;code>HelmRelease&lt;/code>, you then use a reference to the &lt;code>GitRepository&lt;/code> resource in the &lt;code>spec.chart.spec&lt;/code> (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.HelmChartTemplate">Helm API reference&lt;/a>):&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># The interval at which to reconcile the Helm release&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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">chart&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">spec&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:#60a0b0;font-style:italic"># The path of the chart relative to the repository root&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">chart&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>./charts/my-chart&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:#60a0b0;font-style:italic"># The reference to the GitRepository&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">sourceRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&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>my-repository&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:#60a0b0;font-style:italic"># Optional, defaults to the namespace of the HelmRelease&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>spec.chart.spec&lt;/code> values are used by the Helm Controller as a template to create a new &lt;code>HelmChart&lt;/code> resource in the same namespace as the &lt;code>sourceRef&lt;/code>, to be reconciled by the Source Controller. The Helm Controller watches &lt;code>HelmChart&lt;/code> resources for (revision) changes, and performs an installation or upgrade when it notices a change.&lt;/p>
&lt;h3 id="defining-values">Defining values&lt;/h3>
&lt;h4 id="inlined-values">Inlined values&lt;/h4>
&lt;p>Inlined values (defined in the &lt;code>spec.values&lt;/code> of the &lt;code>HelmRelease&lt;/code>) still work as with the Helm operator. It represents a YAML map as you would put in a file and supply to &lt;code>helm&lt;/code> with &lt;code>-f values.yaml&lt;/code>, but inlined into the &lt;code>HelmRelease&lt;/code> manifest:&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">values&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">foo&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>value1&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">bar&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">baz&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>value2&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">oof&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>- item1&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>- item2&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="values-from-sources">Values from sources&lt;/h4>
&lt;p>As described in the
&lt;a href="#overview-of-changes">overview of changes&lt;/a>, there have been multiple changes to the way you can refer to values from sources (like &lt;code>ConfigMap&lt;/code> and &lt;code>Secret&lt;/code> references), including the
&lt;a href="#values-from-external-source-references-urls-are-no-longer-supported">drop of support for external source (URL) references&lt;/a> and
&lt;a href="#you-can-now-merge-single-values-at-a-given-path">added support for merging single values at a specific path&lt;/a>.&lt;/p>
&lt;p>Values are still merged in the order given, with later values overwriting earlier. The values from sources always have a lower priority than the values inlined in the &lt;code>HelmRelease&lt;/code> via the &lt;code>spec.values&lt;/code> key.&lt;/p>
&lt;h5 id="configmap-and-secret-references">&lt;code>ConfigMap&lt;/code> and &lt;code>Secret&lt;/code> references&lt;/h5>
&lt;p>&lt;code>ConfigMap&lt;/code> and &lt;code>Secret&lt;/code> references used to be defined as follows:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">valuesFrom&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">configMapKeyRef&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>my-config-values&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-ns&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">key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values.yaml&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">optional&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">secretKeyRef&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>my-secret-values&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-ns&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">key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values.yaml&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">optional&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>In the new API spec the individual &lt;code>configMapKeyRef&lt;/code> and &lt;code>secretKeyRef&lt;/code> objects are bundled into a single
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.ValuesReference">&lt;code>ValuesReference&lt;/code>&lt;/a> which
&lt;a href="#values-from-external-source-references-urls-are-no-longer-supported">does no longer allow refering to resources in other namespaces&lt;/a>:&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">valuesFrom&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ConfigMap&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>my-config-values&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">valuesKey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values.yaml&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">optional&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Secret&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>my-secret-values&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">valuesKey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values.yaml&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">optional&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>Another thing to take note of is that the behavior for values references marked as &lt;code>optional&lt;/code> has changed. When set, a &amp;ldquo;not found&amp;rdquo; error for the values reference is ignored, but any &lt;code>valuesKey&lt;/code>, &lt;code>targetPath&lt;/code> or transient error will still result in a reconciliation failure.&lt;/p>
&lt;h5 id="chart-file-references">Chart file references&lt;/h5>
&lt;p>With the Helm Operator it was possible to refer to an alternative values file (for e.g. production usage) in the directory of a chart from a Git repository:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">valuesFrom&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:#60a0b0;font-style:italic"># Values file to merge in,&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:#60a0b0;font-style:italic"># expected to be a relative path in the chart directory&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">chartFileRef&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values-prod.yaml&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With the Helm Controller, this declaration has moved to the &lt;code>spec.chart.spec&lt;/code>, and the feature is no longer limited to charts from a Git repository:&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">chart&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">spec&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">chart&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-chart&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:#40a070">1.2.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:#60a0b0;font-style:italic"># Alternative values file to use as the default values,&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:#60a0b0;font-style:italic"># expected to be a relative path in the sourceRef&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">valuesFiles&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>- values.yaml&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>- values-prod.yaml&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">sourceRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRepository&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>my-repository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When &lt;code>valuesFiles&lt;/code> is defined, the chart will be (re)packaged with the values from the referenced files as the default values, merged in the order they appear. Note that this behavior is different from the Helm Operator as the default values (values.yaml) are not merged by default and must be explicitly added to the list.&lt;/p>
&lt;h5 id="external-source-references">External source references&lt;/h5>
&lt;p>While
&lt;a href="#values-from-external-source-references-urls-are-no-longer-supported">the support for external source references has been dropped&lt;/a>, it is possible to work around this limitation by creating a &lt;code>CronJob&lt;/code> that periodically fetches the values from an external URL and saves them to a &lt;code>ConfigMap&lt;/code> or &lt;code>Secret&lt;/code> resource.&lt;/p>
&lt;p>First, create a &lt;code>ServiceAccount&lt;/code>, &lt;code>Role&lt;/code> and &lt;code>RoleBinding&lt;/code> capable of updating a limited set of &lt;code>ConfigMap&lt;/code> resources:&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:#0e84b5;font-weight:bold">---&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>v1&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>ServiceAccount&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">metadata&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>values-fetcher&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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:#0e84b5;font-weight:bold">---&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>rbac.authorization.k8s.io/v1&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>Role&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">metadata&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>configmap-updater&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">rules&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">apiGroups&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">resources&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#34;configmaps&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:#60a0b0;font-style:italic"># ResourceNames limits the access of the role to&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:#60a0b0;font-style:italic"># a defined set of ConfigMap resources&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">resourceNames&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#34;my-external-values&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">verbs&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#34;patch&amp;#34;&lt;/span>,&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;get&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:#0e84b5;font-weight:bold">---&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>rbac.authorization.k8s.io/v1&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>RoleBinding&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">metadata&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>update-values-configmaps&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">subjects&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ServiceAccount&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>values-fetcher&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">roleRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Role&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>configmap-updater&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">apiGroup&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>rbac.authorization.k8s.io&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>As &lt;code>resourceNames&lt;/code> scoping in the &lt;code>Role&lt;/code>
&lt;a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources" target="_blank">does not allow restricting &lt;code>create&lt;/code> requests&lt;/a>, we need to create empty placeholder(s) for the &lt;code>ConfigMap&lt;/code> resource(s) that will hold the fetched values:&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:#0e84b5;font-weight:bold">---&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>v1&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>ConfigMap&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">metadata&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>my-external-values&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">data&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>{}&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Lastly, create a &lt;code>CronJob&lt;/code> that uses the &lt;code>ServiceAccount&lt;/code> defined above, fetches the external values on an interval, and applies them to the &lt;code>ConfigMap&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">---&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>batch/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>CronJob&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">metadata&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>fetch-external-values&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">spec&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">concurrencyPolicy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Forbid&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">schedule&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;*/5 * * * *&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">successfulJobsHistoryLimit&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">failedJobsHistoryLimit&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">jobTemplate&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">spec&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">template&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">spec&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">serviceAccountName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>values-fetcher&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">containers&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>kubectl&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>bitnami/kubectl:1.19&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">volumeMounts&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">mountPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>/tmp&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>tmp-volume&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">command&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>- sh&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>- -c&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">args&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>- &amp;gt;-&lt;span style="color:#4070a0;font-style:italic">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> curl -f -# https://example.com/path/to/values.yaml -o /tmp/values.yaml &amp;amp;&amp;amp;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kubectl create configmap my-external-values --from-file=/tmp/values.yaml -oyaml --dry-run=client |
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kubectl apply -f -&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">volumes&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>tmp-volume&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">emptyDir&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">medium&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Memory&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">restartPolicy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>OnFailure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can now refer to the &lt;code>my-external-values&lt;/code> &lt;code>ConfigMap&lt;/code> resource in your &lt;code>HelmRelease&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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">valuesFrom&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ConfigMap&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>my-external-values&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="defining-release-options">Defining release options&lt;/h3>
&lt;p>With the Helm Operator the release options used to be configured in the &lt;code>spec&lt;/code> of the &lt;code>HelmRelease&lt;/code> and applied to both Helm install and upgrade actions.&lt;/p>
&lt;p>This has changed for the Helm Controller, where some defaults can be defined in the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.HelmReleaseSpec">&lt;code>spec&lt;/code>&lt;/a>, but specific action configurations and overwrites for the defaults can be defined in the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Install">&lt;code>spec.install&lt;/code>&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Upgrade">&lt;code>spec.upgrade&lt;/code>&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Test">&lt;code>spec.test&lt;/code>&lt;/a> sections of the &lt;code>HelmRelease&lt;/code>.&lt;/p>
&lt;h3 id="defining-a-rollback--uninstall-configuration">Defining a rollback / uninstall configuration&lt;/h3>
&lt;p>With the Helm Operator, uninstalling a release after an installation failure was done automatically, and rolling back from a faulty upgrade and configuring options like retries was done as follows:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">rollback&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">enable&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;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">retries&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;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">maxRetries&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">5&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">disableHooks&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">force&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">recreate&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">timeout&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">300&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The Helm Controller offers an extensive set of configuration options to remediate when a Helm release fails, using
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.InstallRemediation">&lt;code>spec.install.remediation&lt;/code>&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.UpgradeRemediation">&lt;code>spec.upgrade.remediation&lt;/code>&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2beta2#helm.toolkit.fluxcd.io/v2.Rollback">&lt;code>spec.rollback&lt;/code>&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Uninstall">&lt;code>spec.uninstall&lt;/code>&lt;/a>. Some of the new features include the option to remediate with an uninstall after an upgrade failure, and the option to keep a failed release for debugging purposes when it has run out of retries.&lt;/p>
&lt;h4 id="automated-uninstalls">Automated uninstalls&lt;/h4>
&lt;p>The configuration below mimics the uninstall behavior of the Helm Operator (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.InstallRemediation">&lt;code>InstallRemediation&lt;/code>&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Uninstall">&lt;code>Uninstall&lt;/code>&lt;/a> API references):&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">install&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:#60a0b0;font-style:italic"># Remediation configuration for when the Helm install&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:#60a0b0;font-style:italic"># (or sequent Helm test) action fails&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">remediation&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:#60a0b0;font-style:italic"># Number of retries that should be attempted on failures before&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:#60a0b0;font-style:italic"># bailing, a negative integer equals to unlimited retries&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">retries&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>-&lt;span style="color:#40a070">1&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:#60a0b0;font-style:italic"># Configuration options for the Helm uninstall action&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">uninstall&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">timeout&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5m&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">disableHooks&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">keepHistory&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="automated-rollbacks">Automated rollbacks&lt;/h4>
&lt;p>The configuration below shows an automated rollback configuration that equals
&lt;a href="#defining-a-rollback--uninstall-configuration">the configuration for the Helm Operator showed above&lt;/a> (for all available fields, consult the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.UpgradeRemediation">&lt;code>UpgradeRemediation&lt;/code>&lt;/a> and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/helm/api/v2/#helm.toolkit.fluxcd.io/v2.Rollback">&lt;code>Rollback&lt;/code>&lt;/a> API references):&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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>my-release&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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:#60a0b0;font-style:italic"># ...omitted for brevity&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">upgrade&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:#60a0b0;font-style:italic"># Remediaton configuration for when an Helm upgrade action fails&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">remediation&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:#60a0b0;font-style:italic"># Amount of retries to attempt after a failure,&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:#60a0b0;font-style:italic"># setting this to 0 means no remedation will be&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:#60a0b0;font-style:italic"># attempted&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">retries&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">5&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:#60a0b0;font-style:italic"># Configuration options for the Helm rollback action&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">rollback&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">timeout&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5m&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">disableWait&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">disableHooks&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">recreate&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">force&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&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">cleanupOnFail&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#007020;font-weight:bold">false&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="migration-strategy">Migration strategy&lt;/h2>
&lt;p>Due to the high number of changes to the API spec, there are no detailed instructions available to provide a simple migration path. But there is a
&lt;a href="#steps">simple procedure to follow&lt;/a>, which combined with the detailed list of
&lt;a href="#api-spec-changes">API spec changes&lt;/a> should make the migration path relatively easy.&lt;/p>
&lt;p>Here are some things to know:&lt;/p>
&lt;ul>
&lt;li>The Helm Controller will ignore the old custom resources (and the Helm Operator will ignore the new resources).&lt;/li>
&lt;li>Deleting a resource while the corresponding controller is running will result in the Helm release also being deleted.&lt;/li>
&lt;li>Deleting a &lt;code>CustomResourceDefinition&lt;/code> will also delete all custom resources of that kind.&lt;/li>
&lt;li>If both the Helm Controller and Helm Operator are running, and both a new and old custom resources define a release, they will fight over the release.&lt;/li>
&lt;li>The Helm Controller will always perform an upgrade the first time it encounters a new &lt;code>HelmRelease&lt;/code> for an existing release; this is
&lt;a href="#helm-storage-drift-detection-no-longer-relies-on-dry-runs">due to the changes to release mechanics and bookkeeping&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>The safest way to upgrade is to avoid deletions and fights by stopping the Helm Operator. Once the operator is not running, it is safe to deploy the Helm Controller (e.g., by following the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/get-started/">Get Started guide&lt;/a>,
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/cmd/flux_install/">utilizing &lt;code>flux install&lt;/code>&lt;/a>, or using the manifests from the
&lt;a href="https://github.com/fluxcd/helm-controller/releases" target="_blank">release page&lt;/a>), and start replacing the old resources with new resources. You can keep the old resources around during this process, since the Helm Controller will ignore them.&lt;/p>
&lt;h3 id="steps">Steps&lt;/h3>
&lt;p>The recommended migration steps for a single &lt;code>HelmRelease&lt;/code> are as follows:&lt;/p>
&lt;ol>
&lt;li>Ensure the Helm Operator is not running, as otherwise the Helm Controller and Helm Operator will fight over the release.&lt;/li>
&lt;li>Create a
&lt;a href="#defining-the-helm-chart">&lt;code>GitRepository&lt;/code> or &lt;code>HelmRepository&lt;/code> resource for the &lt;code>HelmRelease&lt;/code>&lt;/a>, including any &lt;code>Secret&lt;/code> that may be required to access the source. Note that it is possible for multiple &lt;code>HelmRelease&lt;/code> resources to share a &lt;code>GitRepository&lt;/code> or &lt;code>HelmRepository&lt;/code> resource.&lt;/li>
&lt;li>Create a new &lt;code>HelmRelease&lt;/code> resource (
&lt;a href="#the-helmrelease-custom-resource-group-domain-changed">with the &lt;code>helm.toolkit.fluxcd.io&lt;/code> group domain&lt;/a>), define the &lt;code>spec.releaseName&lt;/code> (plus the &lt;code>spec.targetNamespace&lt;/code> and &lt;code>spec.storageNamespace&lt;/code> if applicable) to match that of the existing release, and rewrite the configuration to adhere to the
&lt;a href="#api-spec-changes">API spec changes&lt;/a>.&lt;/li>
&lt;li>Confirm the Helm Controller successfully upgrades the release.&lt;/li>
&lt;/ol>
&lt;h3 id="example">Example&lt;/h3>
&lt;p>As a full example, this is an old resource:&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:#0e84b5;font-weight:bold">---&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>helm.fluxcd.io/v1&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>HelmRelease&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">metadata&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>podinfo&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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">chart&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">repository&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://stefanprodan.github.io/podinfo&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>podinfo&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:#40a070">5.0.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">values&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">replicaCount&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The custom resources for the Helm Controller would be:&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:#0e84b5;font-weight:bold">---&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>source.toolkit.fluxcd.io/v1&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>HelmRepository&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">metadata&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>podinfo&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://stefanprodan.github.io/podinfo&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:#0e84b5;font-weight:bold">---&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>helm.toolkit.fluxcd.io/v2&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>HelmRelease&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">metadata&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>podinfo&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&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">spec&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5m&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">releaseName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default-podinfo&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">chart&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">spec&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">chart&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&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:#40a070">5.0.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">sourceRef&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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRepository&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>podinfo&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>10m&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">values&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">replicaCount&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="migrating-gradually">Migrating gradually&lt;/h3>
&lt;p>Gradually migrating to the Helm Controller is possible by scaling down the Helm Operator while you move over resources, and scaling it up again once you have migrated some of the releases to the Helm Controller.&lt;/p>
&lt;p>While doing this, make sure that once you scale up the Helm Operator again, there are no old and new &lt;code>HelmRelease&lt;/code> resources pointing towards the same release, as they will fight over the release.&lt;/p>
&lt;p>Alternatively, you can gradually migrate per namespace without ever needing to shut the Helm Operator down, enabling no continuous delivery interruption on most namespaces. To do so, you can customize the Helm Operator roles associated to its &lt;code>ServiceAccount&lt;/code> to prevent it from interfering with the Helm Controller in namespaces you are migrating. First, create a new &lt;code>ClusterRole&lt;/code> for the Helm Operator to operate in &amp;ldquo;read-only&amp;rdquo; mode cluster-wide:&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:#0e84b5;font-weight:bold">---&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>rbac.authorization.k8s.io/v1&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>ClusterRole&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">metadata&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>helm-operator-ro&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">rules&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">apiGroups&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&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">resources&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&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">verbs&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>- get&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>- watch&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>- list&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">nonResourceURLs&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&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">verbs&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#39;*&amp;#39;&lt;/span>]&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>By default,
&lt;a href="https://github.com/fluxcd/helm-operator/blob/1baacd6dee865b57da80e0e767286ed68d578246/deploy/rbac.yaml#L9-L36" target="_blank">the &lt;code>helm-operator&lt;/code> &lt;code>ServiceAccount&lt;/code> is bound to a &lt;code>ClusterRole&lt;/code> that allows it to create, patch and delete resources in all namespaces&lt;/a>. Bind the &lt;code>ServiceAccount&lt;/code> to the new &lt;code>helm-operator-ro&lt;/code> &lt;code>ClusterRole&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-diff" data-lang="diff">&lt;span style="display:flex;">&lt;span>&lt;span style="font-weight:bold">---
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="font-weight:bold">&lt;/span>apiVersion: rbac.authorization.k8s.io/v1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kind: ClusterRoleBinding
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>metadata:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: helm-operator
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>roleRef:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> apiGroup: rbac.authorization.k8s.io
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> kind: ClusterRole
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a00000">- name: helm-operator
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a00000">&lt;/span>&lt;span style="color:#00a000">+ name: helm-operator-ro
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#00a000">&lt;/span>subjects:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - kind: ServiceAccount
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> name: helm-operator
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> namespace: flux
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Finally, create &lt;code>RoleBindings&lt;/code> for each namespace, but the one you are currently migrating:&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"># Create a `RoleBinding` for each namespace the Helm Operator is allowed to process `HelmReleases` in&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:#0e84b5;font-weight:bold">---&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>rbac.authorization.k8s.io/v1&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>RoleBinding&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">metadata&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>helm-operator&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helm-operator-watched-namespace&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">roleRef&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">apiGroup&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>rbac.authorization.k8s.io&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>ClusterRole&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>helm-operator&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">subjects&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>helm-operator&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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux&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>ServiceAccount&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:#60a0b0;font-style:italic"># Do not create the following to prevent the Helm Operator from watching `HelmReleases` in `helm-controller-watched-namespace`&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:#60a0b0;font-style:italic"># ---&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:#60a0b0;font-style:italic"># apiVersion: rbac.authorization.k8s.io/v1&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:#60a0b0;font-style:italic"># kind: RoleBinding&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:#60a0b0;font-style:italic"># metadata:&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:#60a0b0;font-style:italic"># name: helm-operator&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:#60a0b0;font-style:italic"># namespace: helm-controller-watched-namespace&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:#60a0b0;font-style:italic"># roleRef:&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:#60a0b0;font-style:italic"># apiGroup: rbac.authorization.k8s.io&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:#60a0b0;font-style:italic"># kind: ClusterRole&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:#60a0b0;font-style:italic"># name: helm-operator&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:#60a0b0;font-style:italic"># subjects:&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:#60a0b0;font-style:italic"># - name: helm-operator&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:#60a0b0;font-style:italic"># namespace: flux&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:#60a0b0;font-style:italic"># kind: ServiceAccount&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you are using
&lt;a href="https://github.com/fluxcd/helm-operator/tree/master/chart/helm-operator" target="_blank">the Helm Operator chart&lt;/a>, make sure to set &lt;code>rbac.create&lt;/code> to &lt;code>false&lt;/code> in order to take over &lt;code>ClusterRoleBindings&lt;/code> and &lt;code>RoleBindings&lt;/code> as you wish.&lt;/p>
&lt;h3 id="deleting-old-resources">Deleting old resources&lt;/h3>
&lt;p>Once you have migrated all your &lt;code>HelmRelease&lt;/code> resources to the Helm Controller. You can remove all of the old resources by removing the old Custom Resource Definition.&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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl delete crd helmreleases.helm.fluxcd.io
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="frequently-asked-questions">Frequently Asked Questions&lt;/h2>
&lt;h3 id="are-automated-image-updates-supported">Are automated image updates supported?&lt;/h3>
&lt;p>Yes, image updates are supported for &lt;code>HelmRelease&lt;/code> as well as any other Kubernetes custom resources stored in Git. See the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/guides/image-update/#configure-image-update-for-custom-resources">Image Update Guide&lt;/a> for more information.&lt;/p>
&lt;h3 id="how-do-i-automatically-apply-my-helmrelease-resources-to-the-cluster">How do I automatically apply my &lt;code>HelmRelease&lt;/code> resources to the cluster?&lt;/h3>
&lt;p>If you are currently a Flux v1 user, you can commit the &lt;code>HelmRelease&lt;/code> resources to Git, and Flux will automatically apply them to the cluster like any other resource.&lt;/p>
&lt;p>If you are not a Flux v1 user or want to fully migrate to Flux v2, the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/kustomize/">Kustomize Controller&lt;/a> will serve your needs.&lt;/p>
&lt;h3 id="i-am-still-running-helm-v2-what-is-the-right-upgrade-path-for-me">I am still running Helm v2, what is the right upgrade path for me?&lt;/h3>
&lt;p>Migrate your Helm v2 releases to v3 using the Helm Operator&amp;rsquo;s migration feature, or make use of the
&lt;a href="https://github.com/helm/helm-2to3" target="_blank">&lt;code>helm-2to3&lt;/code>&lt;/a> plugin directly, before continuing following the
&lt;a href="#steps">migration steps&lt;/a>.&lt;/p>
&lt;h3 id="is-the-helm-controller-ready-for-production">Is the Helm Controller ready for production?&lt;/h3>
&lt;p>Probably, but with some side notes:&lt;/p>
&lt;ol>
&lt;li>It is still under active development, and while our focus has been to stabilize the API as much as we can during the first development phase, we do not guarantee there will not be any breaking changes before we reach General Availability. We are however committed to provide
&lt;a href="https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-conversion" target="_blank">conversion webhooks&lt;/a> for upcoming API versions.&lt;/li>
&lt;li>There may be (internal) behavioral changes in upcoming releases, but they should be aimed at further stabilizing the Helm Controller itself, solving edge case issues, providing better logging, observability, and/or other improvements.&lt;/li>
&lt;/ol>
&lt;h3 id="can-i-use-helm-controller-standalone">Can I use Helm Controller standalone?&lt;/h3>
&lt;p>Helm Controller depends on
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/">Source Controller&lt;/a>, you can install both controllers
and manager Helm releases in a declarative way without GitOps.&lt;/p>
&lt;p>For more details please see this
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/faq/#can-i-use-flux-helmreleases-without-gitops">answer&lt;/a>.&lt;/p>
&lt;h3 id="i-have-another-question">I have another question&lt;/h3>
&lt;p>Given the amount of changes, it is quite possible that this document did not provide you with a clear answer for you specific setup. If this applies to you, do not hesitate to ask for help in the
&lt;a href="https://github.com/fluxcd/flux2/discussions/new?category_id=31999889" target="_blank">GitHub Discussions&lt;/a> or on the
&lt;a href="https://slack.cncf.io" target="_blank">&lt;code>#flux&lt;/code> CNCF Slack channel&lt;/a>!&lt;/p></description></item><item><title>Flux: FAQ</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/faq-migration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/faq-migration/</guid><description>
&lt;h2 id="flux-v1-vs-v2-questions">Flux v1 vs v2 questions&lt;/h2>
&lt;h3 id="what-does-flux-v2-mean-for-flux">What does Flux v2 mean for Flux?&lt;/h3>
&lt;p>Flux v1 is a monolithic do-it-all operator; Flux v2 separates the
functionalities into specialized controllers, collectively called the GitOps Toolkit.&lt;/p>
&lt;p>You can install and operate Flux v2 simply using the &lt;code>flux&lt;/code> command.
You can easily pick and choose the functionality you need and extend it to serve your own purposes.&lt;/p>
&lt;p>We went through the following steps for our community:&lt;/p>
&lt;ol>
&lt;li>Put Flux v1 into maintenance mode (no new features being added; bugfixes and CVEs patched only).&lt;/li>
&lt;li>Continued work on the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/roadmap/">Flux v2 roadmap&lt;/a>.&lt;/li>
&lt;li>We provided transition guides for specific user groups, e.g. users of Flux v1 in read-only mode, or of Helm Operator v1, etc. once the functionality was integrated into Flux v2 and it&amp;rsquo;s deemed &amp;ldquo;ready&amp;rdquo;.&lt;/li>
&lt;li>Once the use-cases of Flux v1 were covered, we promised to continue supporting Flux v1 for 6 months.&lt;/li>
&lt;li>We
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/blog/2022/10/september-2022-update/#flux-legacy-v1-retirement-plan">finally archived&lt;/a> Flux Legacy and Helm Operator.&lt;/li>
&lt;/ol>
&lt;h3 id="why-did-you-rewrite-flux">Why did you rewrite Flux?&lt;/h3>
&lt;p>Flux v2 implements its functionality in individual controllers,
which allowed us to address long-standing feature requests much more easily.&lt;/p>
&lt;p>By basing these controllers on modern Kubernetes tooling (&lt;code>controller-runtime&lt;/code> libraries),
they can be dynamically configured with Kubernetes custom resources either by cluster admins
or by other automated tools &amp;ndash; and you get greatly increased observability.&lt;/p>
&lt;p>This gave us the opportunity to build Flux v2 with the top Flux v1 feature requests in mind:&lt;/p>
&lt;ul>
&lt;li>Supporting multiple source Git repositories&lt;/li>
&lt;li>Operational insight through health checks, events and alerts&lt;/li>
&lt;li>Multi-tenancy capabilities, like applying each source repository with its own set of permissions&lt;/li>
&lt;/ul>
&lt;p>On top of that, testing the individual components and understanding the codebase becomes a lot easier.&lt;/p>
&lt;h3 id="what-are-significant-new-differences-between-flux-v1-and-flux-v2">What are significant new differences between Flux v1 and Flux v2?&lt;/h3>
&lt;h4 id="reconciliation">Reconciliation&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Flux v1&lt;/th>
&lt;th>Flux v2&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Limited to a single Git repository&lt;/td>
&lt;td>Multiple Git repositories&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Declarative config via arguments in the Flux deployment&lt;/td>
&lt;td>&lt;code>GitRepository&lt;/code> custom resource, which produces an artifact which can be reconciled by other controllers&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Follow &lt;code>HEAD&lt;/code> of Git branches&lt;/td>
&lt;td>Supports Git branches, pinning on commits and tags, follow SemVer tag ranges&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Suspending of reconciliation by downscaling Flux deployment&lt;/td>
&lt;td>Reconciliation can be paused per resource by suspending the &lt;code>GitRepository&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Credentials config via Arguments and/or Secret volume mounts in the Flux pod&lt;/td>
&lt;td>Credentials config per &lt;code>GitRepository&lt;/code> resource: SSH private key, HTTP/S username/password/token, OpenPGP public keys&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Ignoring resources with &lt;code>fluxcd.io/ignore: &amp;quot;true&amp;quot;&lt;/code> annotation&lt;/td>
&lt;td>Ignoring resources with &lt;code>kustomize.toolkit.fluxcd.io/reconcile: disabled&lt;/code> annotation&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="kustomize-support">&lt;code>kustomize&lt;/code> support&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Flux v1&lt;/th>
&lt;th>Flux v2&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Declarative config through &lt;code>.flux.yaml&lt;/code> files in the Git repository&lt;/td>
&lt;td>Declarative config through a &lt;code>Kustomization&lt;/code> custom resource, consuming the artifact from the GitRepository&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Manifests are generated via shell exec and then reconciled by &lt;code>fluxd&lt;/code>&lt;/td>
&lt;td>Generation, server-side validation, and reconciliation is handled by a specialised &lt;code>kustomize-controller&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Reconciliation using the service account of the Flux deployment&lt;/td>
&lt;td>Support for service account impersonation&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Garbage collection needs cluster role binding for Flux to query the Kubernetes discovery API&lt;/td>
&lt;td>Garbage collection needs no cluster role binding or access to Kubernetes discovery API&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Support for custom commands and generators executed by fluxd in a POSIX shell&lt;/td>
&lt;td>No support for custom commands&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="helm-integration">Helm integration&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Flux v1&lt;/th>
&lt;th>Flux v2&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Declarative config in a single Helm custom resource&lt;/td>
&lt;td>Declarative config through &lt;code>HelmRepository&lt;/code>, &lt;code>GitRepository&lt;/code>, &lt;code>Bucket&lt;/code>, &lt;code>HelmChart&lt;/code> and &lt;code>HelmRelease&lt;/code> custom resources&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Chart synchronisation embedded in the operator&lt;/td>
&lt;td>Extensive release configuration options, and a reconciliation interval per source&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Support for fixed SemVer versions from Helm repositories&lt;/td>
&lt;td>Support for SemVer ranges for &lt;code>HelmChart&lt;/code> resources&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Git repository synchronisation on a global interval&lt;/td>
&lt;td>Planned support for charts from GitRepository sources&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Limited observability via the status object of the HelmRelease resource&lt;/td>
&lt;td>Better observability via the HelmRelease status object, Kubernetes events, and notifications&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Resource heavy, relatively slow&lt;/td>
&lt;td>Better performance&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Chart changes from Git sources are determined from Git metadata&lt;/td>
&lt;td>Chart changes must be accompanied by a version bump in &lt;code>Chart.yaml&lt;/code> to produce a new artifact&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h4 id="notifications-webhooks-observability">Notifications, webhooks, observability&lt;/h4>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Flux v1&lt;/th>
&lt;th>Flux v2&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Emits &amp;ldquo;custom Flux events&amp;rdquo; to a webhook endpoint&lt;/td>
&lt;td>Emits Kubernetes events for included custom resources&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>RPC endpoint can be configured to a 3rd party solution like FluxCloud to be forwarded as notifications to e.g. Slack&lt;/td>
&lt;td>Flux v2 components can be configured to POST the events to a &lt;code>notification-controller&lt;/code> endpoint. Selective forwarding of POSTed events as notifications using &lt;code>Provider&lt;/code> and &lt;code>Alert&lt;/code> custom resources.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Webhook receiver is a side-project&lt;/td>
&lt;td>Webhook receiver, handling a wide range of platforms, is included&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Unstructured logging&lt;/td>
&lt;td>Structured logging for all components&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Custom Prometheus metrics&lt;/td>
&lt;td>Generic / common &lt;code>controller-runtime&lt;/code> Prometheus metrics&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="are-there-any-breaking-changes">Are there any breaking changes?&lt;/h3>
&lt;ul>
&lt;li>In Flux v1 Kustomize support was implemented through &lt;code>.flux.yaml&lt;/code> files in the Git repository. As indicated in the comparison table above, while this approach worked, we found it to be error-prone and hard to debug. The new
&lt;a href="https://github.com/fluxcd/kustomize-controller/blob/main/docs/spec/v1/kustomizations.md" target="_blank">Kustomization CR&lt;/a> should make troubleshooting much easier. Unfortunately we needed to drop the support for custom commands as running arbitrary shell scripts in-cluster poses serious security concerns.&lt;/li>
&lt;li>Helm users: we redesigned the &lt;code>HelmRelease&lt;/code> API and the automation will work quite differently, so upgrading to &lt;code>HelmRelease&lt;/code> v2 will require a little work from you, but you will gain more flexibility, better observability and performance.&lt;/li>
&lt;/ul>
&lt;h3 id="is-the-gitops-toolkit-related-to-the-gitops-engine">Is the GitOps Toolkit related to the GitOps Engine?&lt;/h3>
&lt;p>In an announcement in August 2019, the expectation was set that the Flux project would integrate the GitOps Engine, then being factored out of ArgoCD. Since the result would be backward-incompatible, it would require a major version bump: Flux v2.&lt;/p>
&lt;p>After experimentation and considerable thought, we (the maintainers) have found a path to Flux v2 that we think better serves our vision of GitOps: the GitOps Toolkit. In consequence, we do not now plan to integrate GitOps Engine into Flux.&lt;/p>
&lt;h3 id="how-can-i-get-involved">How can I get involved?&lt;/h3>
&lt;p>There are a variety of ways and we look forward to having you on board building the future of GitOps together:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="https://github.com/fluxcd/flux2/discussions" target="_blank">Discuss the direction&lt;/a> of Flux v2 with us&lt;/li>
&lt;li>Join us in #flux-dev on the
&lt;a href="https://slack.cncf.io" target="_blank">CNCF Slack&lt;/a>&lt;/li>
&lt;li>Check out our
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/contributing/">contributor docs&lt;/a>&lt;/li>
&lt;li>Take a look at the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/roadmap/">roadmap for Flux v2&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Flux: Timetable</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/timetable/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/timetable/</guid><description>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Flux Legacy has reached end of life.&lt;/h4>
&lt;p>Flux Legacy and Helm Operator have
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/blog/2022/10/september-2022-update/#flux-legacy-v1-retirement-plan">been
archived&lt;/a>.&lt;/p>
&lt;p>We strongly recommend you familiarise yourself with the newest Flux and
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/">migrate as soon as possible&lt;/a>.&lt;/p>
&lt;/div>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Date&lt;/th>
&lt;th>Flux 1&lt;/th>
&lt;th>Flux 2 CLI&lt;/th>
&lt;th>GOTK&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Oct 6, 2020&lt;/td>
&lt;td>
&lt;a href="https://github.com/fluxcd/website/pull/25" target="_blank">Maintenance Mode&lt;/a>&lt;br>&lt;ul>&lt;li>Flux 1 releases only include critical bug fixes (which don’t require changing Flux 1 architecture), and security patches (for OS packages, Go runtime, and kubectl). No new features&lt;/li>&lt;li>Existing projects encouraged to test migration to Flux 2 pre-releases in non-production&lt;/li>&lt;/ul>&lt;/td>
&lt;td>Development Mode&lt;br>&lt;ul>&lt;li>Working to finish parity with Flux 1&lt;/li>&lt;li>New projects encouraged to test Flux 2 pre-releases in non-production&lt;/li>&lt;/ul>&lt;/td>
&lt;td>All Alpha&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Feb 18, 2021&lt;/td>
&lt;td>Partial Migration Mode&lt;br>&lt;ul>&lt;li>Existing projects encouraged to migrate to &lt;code>v1beta1&lt;/code>/&lt;code>v2beta1&lt;/code> if you only use those features (Flux 1 read-only mode, and Helm Operator)&lt;/li>&lt;li>Existing projects encouraged to test image automation Alpha in non-production&lt;/li>&lt;/ul>&lt;/td>
&lt;td>Feature Parity&lt;/td>
&lt;td>Image Automation Alpha. All others reached Feature Parity, Beta&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>June 30, 2021&lt;/td>
&lt;td>Superseded&lt;br>&lt;ul>&lt;li>All existing projects encouraged to
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/migration/flux-v1-migration/">migrate to Flux 2&lt;/a>, and
&lt;a href="https://github.com/fluxcd/flux2/issues/new/choose" target="_blank">report any bugs&lt;/a>&lt;/li>&lt;li>Flux 1 Helm Operator code freeze – no further updates except CVEs&lt;/li>&lt;/ul>&lt;/td>
&lt;td>Needs further testing, may get breaking changes&lt;br>&lt;ul>&lt;li>CLI needs further user testing during this migration period&lt;/li>&lt;/ul>&lt;/td>
&lt;td>All Beta, Production Ready&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>&lt;br>&lt;ul>&lt;li>All Flux 1 features stable and supported in Flux 2&lt;/li>&lt;li>Promoting Alpha versions to Beta makes this Production Ready&lt;/li>&lt;/ul>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>May 1, 2022&lt;/td>
&lt;td>Migration and security support only&lt;br>&lt;ul>&lt;li>Flux 1 releases only include security patches (no bug fixes)&lt;/li>&lt;li>Maintainers support users with migration to Flux 2 only, no longer with Flux 1 issues&lt;/li>&lt;/ul>&lt;/td>
&lt;td>Beta, Production Ready&lt;/td>
&lt;td>All Beta, Production Ready&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>November 1, 2022&lt;/td>
&lt;td>Archived&lt;br>&lt;ul>&lt;li>Flux 1 obsolete, no further releases or maintainer support&lt;/li>&lt;li>Flux 1 repo archived&lt;/li>&lt;li>helm-operator repo archived&lt;/li>&lt;/ul>&lt;/td>
&lt;td>Public release candidate, Production Ready&lt;br>&lt;ul>&lt;li>CLI commits to backwards compatibility moving forward&lt;/li>&lt;li>CLI follows kubectl style backwards compatibility support: +1 -1 MINOR version for server components (e.g., APIs, Controllers, validation webhooks)&lt;/li>&lt;/ul>&lt;/td>
&lt;td>All stable, Production Ready&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>GOTK is shorthand for the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/">GitOps Toolkit&lt;/a> APIs and Controllers&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>Versioning: Flux 2 is a multi-service architecture, so requires a more complex explanation than Flux 1:&lt;/p>
&lt;ul>
&lt;li>Flux 2 CLI follows
&lt;a href="https://semver.org/" target="_blank">Semantic Versioning&lt;/a> scheme&lt;/li>
&lt;li>The GitOps Toolkit APIs follow the
&lt;a href="https://kubernetes.io/docs/reference/using-api/#api-versioning" target="_blank">Kubernetes API versioning&lt;/a> pattern. See
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/roadmap/">Roadmap&lt;/a> for component versions.&lt;/li>
&lt;li>These are coordinated for cross-compatibility: For each Flux 2 CLI tag, CLI and GOTK versions are end-to-end tested together, so you may safely upgrade from one MINOR/PATCH version to another.&lt;/li>
&lt;/ul>
&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/li>
&lt;li id="fn:3">
&lt;p>The GOTK Custom Resource Definitions which are at &lt;code>v1beta1&lt;/code>, &lt;code>v1beta2&lt;/code>, &lt;code>v2beta1&lt;/code> and &lt;code>v2beta2&lt;/code> and their controllers are considered stable and production ready. Going forward, breaking changes to the beta CRDs will be accompanied by a conversion mechanism.&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item></channel></rss>