<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Source Controllers</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/</link><description>Recent content in Source Controllers on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Controller Options</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/options/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/options/</guid><description>
&lt;p>To customise the controller options at install time,
please see the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/installation/configuration/bootstrap-customization/">bootstrap customization guide&lt;/a>.&lt;/p>
&lt;h2 id="source-controller-flags">Source controller flags&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>--artifact-retention-records&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The maximum number of artifacts to be kept in storage after a garbage collection. (default 2)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--artifact-retention-ttl&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The duration of time that artifacts from previous reconciliations will be kept in storage before being garbage collected. (default 1m0s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--concurrent&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The number of concurrent reconciles per controller. (default 2)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--default-service-account&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Default service account to use for workload identity when not specified in resources.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--enable-leader-election&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--events-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address of the events receiver.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--health-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the health endpoint binds to. (default &amp;ldquo;:9440&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-cache-max-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The maximum size of the cache in number of indexes.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-cache-purge-interval&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The interval at which the cache is purged. Valid time units are ms, s, m. (default &amp;ldquo;1m&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-cache-ttl&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The TTL of an index in the cache. Valid time units are ms, s, m. (default &amp;ldquo;15m&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-chart-file-max-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The max allowed size in bytes of a file in a Helm chart. (default 5242880)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-chart-max-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The max allowed size in bytes of a Helm chart file. (default 10485760)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--helm-index-max-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The max allowed size in bytes of a Helm repository index file. (default 52428800)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--interval-jitter-percentage&lt;/code>&lt;/td>
&lt;td>uint8&lt;/td>
&lt;td>Percentage of jitter to apply to interval durations. A value of 10 will apply a jitter of +/-10% to the interval duration. It cannot be negative, and must be less than 100. (default 5)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-lease-duration&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Interval at which non-leader candidates will wait to force acquire leadership (duration string). (default 35s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-release-on-cancel&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Defines if the leader should step down voluntarily on controller manager shutdown. (default true)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-renew-deadline&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Duration that the leading controller manager will retry refreshing leadership before giving up (duration string). (default 30s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-retry-period&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Duration the LeaderElector clients should wait between tries of actions (duration string). (default 5s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--log-encoding&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Log encoding format. Can be &amp;lsquo;json&amp;rsquo; or &amp;lsquo;console&amp;rsquo;. (default &amp;ldquo;json&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--log-level&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Log verbosity level. Can be one of &amp;rsquo;trace&amp;rsquo;, &amp;lsquo;debug&amp;rsquo;, &amp;lsquo;info&amp;rsquo;, &amp;rsquo;error&amp;rsquo;. (default &amp;ldquo;info&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--max-retry-delay&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The maximum amount of time for which an object being reconciled will have to wait before a retry. (default 15m0s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--metrics-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the metric endpoint binds to. (default &amp;ldquo;:8080&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--min-retry-delay&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The minimum amount of time for which an object being reconciled will have to wait before a retry. (default 750ms)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--requeue-dependency&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The interval at which failing dependencies are reevaluated. (default 30s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--ssh-hostkey-algos&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>The list of hostkey algorithms to use for ssh connections, arranged from most preferred to the least.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--ssh-kex-algos&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>The list of key exchange algorithms to use for ssh connections, arranged from most preferred to the least.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the static file server binds to. (default &amp;ldquo;:9090&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-adv-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The advertised address of the static file server.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-path&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The local storage path.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--token-cache-max-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The maximum amount of entries in the LRU cache used for tokens. (default 100, enabled)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--token-cache-max-duration&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The maximum duration for which a token would be considered unexpired. This is capped at 1h. (default 1h)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--watch-all-namespaces&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Watch for custom resources in all namespaces, if set to false it will only watch the runtime namespace. (default true)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--watch-label-selector&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Watch for resources with matching labels e.g. &amp;lsquo;sharding.fluxcd.io/key=shard1&amp;rsquo;.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--feature-gates&lt;/code>&lt;/td>
&lt;td>mapStringBool&lt;/td>
&lt;td>A comma separated list of key=value pairs defining the state of experimental features.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="feature-gates">Feature Gates&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Default Value&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>CacheSecretsAndConfigMaps&lt;/code>&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Configures the caching of Secrets and ConfigMaps by the controller-runtime client. When enabled, it will cache both object types, resulting in increased memory usage and cluster-wide RBAC permissions (list and watch).&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>ObjectLevelWorkloadIdentity&lt;/code>&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Enables the use of object-level workload identity for the controller.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>OptimizedGitClones&lt;/code>&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;td>Optimises Git resource usage by only cloning repositories when the HEAD commit changed since last reconciliation.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="source-watcher-flags">Source watcher flags&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Name&lt;/th>
&lt;th>Type&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>--artifact-digest-algo&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The hashing algorithm used to calculate the digest of artifacts. (default &amp;ldquo;sha256&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--artifact-retention-records&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The maximum number of artifacts to be kept in storage after a garbage collection. (default 2)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--artifact-retention-ttl&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The duration of time that artifacts from previous reconciliations will be kept in storage before being garbage collected. (default 1m0s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--concurrent&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The number of concurrent reconciles per controller. (default 10)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--enable-leader-election&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--events-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address of the events receiver.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--health-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the health endpoint binds to. (default &amp;ldquo;:9440&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--http-retry&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The maximum number of retries when failing to fetch artifacts over HTTP. (default 9)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--interval-jitter-percentage&lt;/code>&lt;/td>
&lt;td>uint8&lt;/td>
&lt;td>Percentage of jitter to apply to interval durations. A value of 10 will apply a jitter of +/-10% to the interval duration. It cannot be negative, and must be less than 100. (default 5)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-lease-duration&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Interval at which non-leader candidates will wait to force acquire leadership (duration string). (default 35s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-release-on-cancel&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Defines if the leader should step down voluntarily on controller manager shutdown. (default true)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-renew-deadline&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Duration that the leading controller manager will retry refreshing leadership before giving up (duration string). (default 30s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--leader-election-retry-period&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>Duration the LeaderElector clients should wait between tries of actions (duration string). (default 5s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--log-encoding&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Log encoding format. Can be &amp;lsquo;json&amp;rsquo; or &amp;lsquo;console&amp;rsquo;. (default &amp;ldquo;json&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--log-level&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Log verbosity level. Can be one of &amp;rsquo;trace&amp;rsquo;, &amp;lsquo;debug&amp;rsquo;, &amp;lsquo;info&amp;rsquo;, &amp;rsquo;error&amp;rsquo;. (default &amp;ldquo;info&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--max-retry-delay&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The maximum amount of time for which an object being reconciled will have to wait before a retry. (default 15m0s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--metrics-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the metric endpoint binds to. (default &amp;ldquo;:8080&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--min-retry-delay&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The minimum amount of time for which an object being reconciled will have to wait before a retry. (default 750ms)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--no-cross-namespace-refs&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>When set to true, references between custom resources are allowed only if the reference and the referee are in the same namespace. (default false)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--reconciliation-timeout&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The maximum duration of a reconciliation. (default 10m0s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--requeue-dependency&lt;/code>&lt;/td>
&lt;td>duration&lt;/td>
&lt;td>The interval at which failing dependencies are reevaluated. (default 5s)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The address the static file server binds to. (default &amp;ldquo;:9090&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-adv-addr&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The advertised address of the static file server.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-path&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The local storage path. (default &amp;ldquo;/data&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--watch-all-namespaces&lt;/code>&lt;/td>
&lt;td>boolean&lt;/td>
&lt;td>Watch for resources in all namespaces, if set to false it will only watch the runtime namespace. (default true)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--feature-gates&lt;/code>&lt;/td>
&lt;td>mapStringBool&lt;/td>
&lt;td>A comma separated list of key=value pairs defining the state of experimental features.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="feature-gates-1">Feature Gates&lt;/h3>
&lt;p>No feature gates are currently available for source-watcher.&lt;/p></description></item><item><title>Flux: Git Repositories</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/gitrepositories/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/gitrepositories/</guid><description>
&lt;p>The &lt;code>GitRepository&lt;/code> API defines a Source to produce an Artifact for a Git
repository revision.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of a GitRepository. It creates a tarball
(&lt;code>.tar.gz&lt;/code>) Artifact with the fetched data from a Git repository for the
resolved reference.&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>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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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://github.com/stefanprodan/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">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>In the above example:&lt;/p>
&lt;ul>
&lt;li>A GitRepository named &lt;code>podinfo&lt;/code> is created, indicated by the
&lt;code>.metadata.name&lt;/code> field.&lt;/li>
&lt;li>The source-controller checks the Git repository every five minutes, indicated
by the &lt;code>.spec.interval&lt;/code> field.&lt;/li>
&lt;li>It clones the &lt;code>master&lt;/code> branch of the &lt;code>https://github.com/stefanprodan/podinfo&lt;/code>
repository, indicated by the &lt;code>.spec.ref.branch&lt;/code> and &lt;code>.spec.url&lt;/code> fields.&lt;/li>
&lt;li>The specified branch and resolved HEAD revision are used as the Artifact
revision, reported in-cluster in the &lt;code>.status.artifact.revision&lt;/code> field.&lt;/li>
&lt;li>When the current GitRepository revision differs from the latest fetched
revision, a new Artifact is archived.&lt;/li>
&lt;li>The new Artifact is reported in the &lt;code>.status.artifact&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>You can run this example by saving the manifest into &lt;code>gitrepository.yaml&lt;/code>.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f gitrepository.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get gitrepository&lt;/code> to see the GitRepository:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME URL AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo https://github.com/stefanprodan/podinfo 5s True stored artifact for revision &amp;#39;master@sha1:132f4e719209eb10b9485302f8593fc0e680f4fc&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl describe gitrepository podinfo&lt;/code> to see the
&lt;a href="#artifact">Artifact&lt;/a>
and
&lt;a href="#conditions">Conditions&lt;/a> in the GitRepository&amp;rsquo;s 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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Artifact:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Digest: sha256:95e386f421272710c4cedbbd8607dbbaa019d500e7a5a0b6720bc7bebefc7bf2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Update Time: 2022-02-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Path: gitrepository/default/podinfo/132f4e719209eb10b9485302f8593fc0e680f4fc.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Revision: master@sha1:132f4e719209eb10b9485302f8593fc0e680f4fc
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Size: 91318
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./gitrepository/default/podinfo/132f4e719209eb10b9485302f8593fc0e680f4fc.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;master@sha1:132f4e719209eb10b9485302f8593fc0e680f4fc&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;master@sha1:132f4e719209eb10b9485302f8593fc0e680f4fc&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: ArtifactInStorage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal NewArtifact 62s source-controller stored artifact for commit &amp;#39;Merge pull request #160 from stefanprodan/release-6.0.3&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="writing-a-gitrepository-spec">Writing a GitRepository spec&lt;/h2>
&lt;p>As with all other Kubernetes config, a GitRepository needs &lt;code>apiVersion&lt;/code>,
&lt;code>kind&lt;/code>, and &lt;code>metadata&lt;/code> fields. The name of a GitRepository object must be a
valid
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names#dns-subdomain-names" target="_blank">DNS subdomain name&lt;/a>.&lt;/p>
&lt;p>A GitRepository also needs a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" target="_blank">&lt;code>.spec&lt;/code> section&lt;/a>.&lt;/p>
&lt;h3 id="url">URL&lt;/h3>
&lt;p>&lt;code>.spec.url&lt;/code> is a required field that specifies the HTTP/S or SSH address of the
Git repository.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> Unlike using &lt;code>git&lt;/code>, the
&lt;a href="https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_the_ssh_protocol" target="_blank">shorter scp-like syntax&lt;/a>
is not supported for SSH addresses (e.g. &lt;code>user@example.com:repository.git&lt;/code>).
Instead, the valid URL format is &lt;code>ssh://user@example.com:22/repository.git&lt;/code>.&lt;/p>
&lt;h3 id="secret-reference">Secret reference&lt;/h3>
&lt;p>&lt;code>.spec.secretRef.name&lt;/code> is an optional field to specify a name reference to a
Secret in the same namespace as the GitRepository, containing authentication
credentials for the Git repository.&lt;/p>
&lt;p>The required fields in the Secret depend on the specified protocol in the
&lt;a href="#url">URL&lt;/a>.&lt;/p>
&lt;h4 id="basic-access-authentication">Basic access authentication&lt;/h4>
&lt;p>To authenticate towards a Git repository over HTTPS using basic access
authentication (in other words: using a username and password), the referenced
Secret is expected to contain &lt;code>.data.username&lt;/code> and &lt;code>.data.password&lt;/code> 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>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>basic-access-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="bearer-token-authentication">Bearer token authentication&lt;/h4>
&lt;p>To authenticate towards a Git repository over HTTPS using bearer token
authentication (in other words: using a &lt;code>Authorization: Bearer&lt;/code> header), the referenced
Secret is expected to contain the token in &lt;code>.data.bearerToken&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> If you are looking to use OAuth tokens with popular servers (e.g.
&lt;a href="https://docs.github.com/en/rest/overview/authenticating-to-the-rest-api?apiVersion=2022-11-28#authenticating-with-a-token-generated-by-an-app" target="_blank">GitHub&lt;/a>,
&lt;a href="https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/" target="_blank">Bitbucket&lt;/a>,
&lt;a href="https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html#clone-using-a-token" target="_blank">GitLab&lt;/a>),
you should use basic access authentication instead. These servers use basic HTTP
authentication, with the OAuth token as the password. Check the documentation of
your Git server for details.&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>bearer-token-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">bearerToken&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="https-certificate-authority">HTTPS Certificate Authority&lt;/h4>
&lt;p>To provide a Certificate Authority to trust while connecting with a Git
repository over HTTPS, the referenced Secret&amp;rsquo;s &lt;code>.data&lt;/code> can contain a &lt;code>ca.crt&lt;/code>
or &lt;code>caFile&lt;/code> key. &lt;code>ca.crt&lt;/code> takes precedence over &lt;code>caFile&lt;/code>, i.e. if both keys
are present, the value of &lt;code>ca.crt&lt;/code> will be taken into consideration.&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>https-ca-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="https-mutual-tls-authentication">HTTPS Mutual TLS authentication&lt;/h4>
&lt;p>To authenticate towards a Git repository over HTTPS using mutual TLS,
the referenced Secret&amp;rsquo;s &lt;code>.data&lt;/code> should contain the following keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tls.crt&lt;/code> and &lt;code>tls.key&lt;/code>, to specify the client certificate and private key used
for TLS client authentication. These must be used in conjunction, i.e.
specifying one without the other will lead to an error.&lt;/li>
&lt;li>&lt;code>ca.crt&lt;/code>, to specify the CA certificate used to verify the server, which is
required if the server is using a self-signed certificate.&lt;/li>
&lt;/ul>
&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>https-tls-certs&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">tls.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">tls.key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="ssh-authentication">SSH authentication&lt;/h4>
&lt;p>To authenticate towards a Git repository over SSH, the referenced Secret is
expected to contain &lt;code>identity&lt;/code> and &lt;code>known_hosts&lt;/code> fields. With the respective
private key of the SSH key pair, and the host keys of the 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>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>ssh-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>|&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"> -----BEGIN OPENSSH PRIVATE KEY-----
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&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"> -----END OPENSSH PRIVATE KEY-----&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>|&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"> github.com ecdsa-sha2-nistp256 AAAA...&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Alternatively, the Flux CLI can be used to automatically create the
secret, and also populate the known_hosts:&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 secret git podinfo-auth &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/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> --private-key-file&lt;span style="color:#666">=&lt;/span>./identity
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For password-protected SSH private keys, the password must be provided
via an additional &lt;code>password&lt;/code> field in the secret. Flux CLI also supports
this via the &lt;code>--password&lt;/code> flag.&lt;/p>
&lt;h3 id="provider">Provider&lt;/h3>
&lt;p>&lt;code>.spec.provider&lt;/code> is an optional field that allows specifying an OIDC provider
used for authentication purposes.&lt;/p>
&lt;p>Supported options are:&lt;/p>
&lt;ul>
&lt;li>&lt;code>generic&lt;/code>&lt;/li>
&lt;li>&lt;code>azure&lt;/code>&lt;/li>
&lt;li>&lt;code>github&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>When provider is not specified, it defaults to &lt;code>generic&lt;/code> indicating that
mechanisms using &lt;code>spec.secretRef&lt;/code> are used for authentication.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h4 id="azure">Azure&lt;/h4>
&lt;p>The &lt;code>azure&lt;/code> provider can be used to authenticate to Azure DevOps repositories
automatically using Workload Identity.&lt;/p>
&lt;h5 id="pre-requisites">Pre-requisites&lt;/h5>
&lt;ul>
&lt;li>Ensure that your Azure DevOps Organization is
&lt;a href="https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/connect-organization-to-azure-ad?view=azure-devops" target="_blank">connected&lt;/a>
to Microsoft Entra.&lt;/li>
&lt;li>Ensure Workload Identity is properly
&lt;a href="https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster#create-an-aks-cluster" target="_blank">set up on your
cluster&lt;/a>.&lt;/li>
&lt;/ul>
&lt;h5 id="configure-flux-controller">Configure Flux controller&lt;/h5>
&lt;ul>
&lt;li>
&lt;p>Create a managed identity to access Azure DevOps. Establish a federated
identity credential between the managed identity and the source-controller
service account. In the default installation, the source-controller service
account is located in the &lt;code>flux-system&lt;/code> namespace with name
&lt;code>source-controller&lt;/code>. Ensure the federated credential uses the correct
namespace and name of the source-controller service account. For more details,
please refer to this
&lt;a href="https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject" target="_blank">guide&lt;/a>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the managed identity to the Azure DevOps organization as a user. Ensure
that the managed identity has the necessary permissions to access the Azure
DevOps repository as described
&lt;a href="https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/service-principal-managed-identity?view=azure-devops#2-add-and-manage-service-principals-in-an-azure-devops-organization" target="_blank">here&lt;/a>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the following patch to your bootstrap repository in
&lt;code>flux-system/kustomization.yaml&lt;/code> file:&lt;/p>
&lt;/li>
&lt;/ul>
&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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/client-id: &amp;lt;AZURE_CLIENT_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &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">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: apps/v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: Deployment
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> spec:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> template:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When azure &lt;code>provider&lt;/code> is used with &lt;code>GitRepository&lt;/code>, the &lt;code>.spec.url&lt;/code>
must follow this format:&lt;/p>
&lt;pre tabindex="0">&lt;code>https://dev.azure.com/{your-organization}/{your-project}/_git/{your-repository}
&lt;/code>&lt;/pre>&lt;h4 id="github">GitHub&lt;/h4>
&lt;p>The &lt;code>github&lt;/code> provider can be used to authenticate to Git repositories using
&lt;a href="https://docs.github.com/en/apps/overview" target="_blank">GitHub Apps&lt;/a>.&lt;/p>
&lt;h5 id="pre-requisites-1">Pre-requisites&lt;/h5>
&lt;ul>
&lt;li>
&lt;p>
&lt;a href="https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app" target="_blank">Register&lt;/a>
the GitHub App with the necessary permissions and
&lt;a href="https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps" target="_blank">generate a private
key&lt;/a>
for the app.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>
&lt;a href="https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app" target="_blank">Install&lt;/a>
the app in the organization/account configuring access to the necessary
repositories.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h5 id="configure-github-app-secret">Configure GitHub App secret&lt;/h5>
&lt;p>The GitHub App information is specified in &lt;code>.spec.secretRef&lt;/code> in the format
specified below:&lt;/p>
&lt;ul>
&lt;li>Get the App ID from the app settings page at
&lt;code>https://github.com/settings/apps/&amp;lt;app-name&amp;gt;&lt;/code>.&lt;/li>
&lt;li>Get the App Installation ID from the app installations page at
&lt;code>https://github.com/settings/installations&lt;/code>. Click the installed app, the URL
will contain the installation ID
&lt;code>https://github.com/settings/installations/&amp;lt;installation-id&amp;gt;&lt;/code>. For
organizations, the first part of the URL may be different, but it follows the
same pattern.&lt;/li>
&lt;li>The private key that was generated in the pre-requisites.&lt;/li>
&lt;li>(Optional) GitHub Enterprise Server users can set the base URL to
&lt;code>http(s)://HOSTNAME/api/v3&lt;/code>.&lt;/li>
&lt;li>(Optional) If GitHub Enterprise Server uses a private CA, include its bundle (root and any intermediates) in &lt;code>ca.crt&lt;/code>.
If the &lt;code>ca.crt&lt;/code> is specified, then it will be used for TLS verification for all API / Git over &lt;code>HTTPS&lt;/code> requests to the GitHub Enterprise Server.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>NOTE:&lt;/strong> If the secret contains &lt;code>tls.crt&lt;/code>, &lt;code>tls.key&lt;/code> then
&lt;a href="#https-mutual-tls-authentication">mutual TLS configuration&lt;/a> will be automatically enabled.
Omit these keys if the GitHub server does not support mutual TLS.&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>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>github-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">githubAppID&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;app-id&amp;gt;&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">githubAppInstallationID&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;app-installation-id&amp;gt;&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">githubAppPrivateKey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> -----BEGIN RSA PRIVATE KEY-----
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&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"> -----END RSA PRIVATE KEY-----&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">githubAppBaseURL&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;github-enterprise-api-url&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic">#optional, required only for GitHub Enterprise Server users&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic">#optional, for GitHub Enterprise Server users&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>-----BEGIN CERTIFICATE-----&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>-----END CERTIFICATE-----&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Alternatively, the Flux CLI can be used to automatically create the secret with
the github app authentication information.&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 secret githubapp ghapp-secret &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> --app-id&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#40a070">1&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> --app-installation-id&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#40a070">3&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> --app-private-key&lt;span style="color:#666">=&lt;/span>~/private-key.pem
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="service-account-reference">Service Account reference&lt;/h3>
&lt;p>&lt;code>.spec.serviceAccountName&lt;/code> is an optional field to specify a Service Account
in the same namespace as GitRepository with purpose depending on the value of
the &lt;code>.spec.provider&lt;/code> field:&lt;/p>
&lt;ul>
&lt;li>When &lt;code>.spec.provider&lt;/code> is set to &lt;code>azure&lt;/code>, the Service Account
will be used for Workload Identity authentication. In this case, the controller
feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must be enabled, otherwise the
controller will error out. For Azure DevOps specific setup, see the
&lt;a href="https://fluxcd.io/flux/integrations/azure/#for-azure-devops" target="_blank">Azure DevOps integration guide&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Note:&lt;/strong> that for a publicly accessible git repository, you don&amp;rsquo;t need to
provide a &lt;code>secretRef&lt;/code> nor &lt;code>serviceAccountName&lt;/code>.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h3 id="interval">Interval&lt;/h3>
&lt;p>&lt;code>.spec.interval&lt;/code> is a required field that specifies the interval at which the
Git repository must be fetched.&lt;/p>
&lt;p>After successfully reconciling the object, the source-controller requeues it
for inspection after the specified interval. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>10m0s&lt;/code> to reconcile the object every 10 minutes.&lt;/p>
&lt;p>If the &lt;code>.metadata.generation&lt;/code> of a resource changes (due to e.g. a change to
the spec), this is handled instantly outside the interval window.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple GitRepository objects are
set up with the same interval. For more information, please refer to the
&lt;a href="https://fluxcd.io/flux/components/source/options/" target="_blank">source-controller configuration options&lt;/a>.&lt;/p>
&lt;h3 id="timeout">Timeout&lt;/h3>
&lt;p>&lt;code>.spec.timeout&lt;/code> is an optional field to specify a timeout for Git operations
like cloning. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>1m30s&lt;/code> for a timeout of one minute and thirty seconds. The default value
is &lt;code>60s&lt;/code>.&lt;/p>
&lt;h3 id="reference">Reference&lt;/h3>
&lt;p>&lt;code>.spec.ref&lt;/code> is an optional field to specify the Git reference to resolve and
watch for changes. References are specified in one or more subfields
(&lt;code>.branch&lt;/code>, &lt;code>.tag&lt;/code>, &lt;code>.semver&lt;/code>, &lt;code>.name&lt;/code>, &lt;code>.commit&lt;/code>), with latter listed fields taking
precedence over earlier ones. If not specified, it defaults to a &lt;code>master&lt;/code>
branch reference.&lt;/p>
&lt;h4 id="branch-example">Branch example&lt;/h4>
&lt;p>To Git checkout a specified branch, use &lt;code>.spec.ref.branch&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>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>&amp;lt;repository-name&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">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">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>&amp;lt;branch-name&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This will perform a shallow clone to only fetch the specified branch.&lt;/p>
&lt;h4 id="tag-example">Tag example&lt;/h4>
&lt;p>To Git checkout a specified tag, use &lt;code>.spec.ref.tag&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>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>&amp;lt;repository-name&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">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">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">tag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;tag-name&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This field takes precedence over
&lt;a href="#branch-example">&lt;code>.branch&lt;/code>&lt;/a>.&lt;/p>
&lt;h4 id="semver-example">SemVer example&lt;/h4>
&lt;p>To Git checkout a tag based on a
&lt;a href="https://github.com/Masterminds/semver#checking-version-constraints" target="_blank">SemVer range&lt;/a>,
use &lt;code>.spec.ref.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:#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>&amp;lt;repository-name&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">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">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:#60a0b0;font-style:italic"># SemVer range reference: https://github.com/Masterminds/semver#checking-version-constraints&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;semver-range&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This field takes precedence over
&lt;a href="#branch-example">&lt;code>.branch&lt;/code>&lt;/a> and
&lt;a href="#tag-example">&lt;code>.tag&lt;/code>&lt;/a>.&lt;/p>
&lt;h4 id="name-example">Name example&lt;/h4>
&lt;p>To Git checkout a specified
&lt;a href="https://git-scm.com/book/en/v2/Git-Internals-Git-References" target="_blank">reference&lt;/a>,
use &lt;code>.spec.ref.name&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>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>&amp;lt;repository-name&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">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">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:#60a0b0;font-style:italic"># Ref name format reference: https://git-scm.com/docs/git-check-ref-format#_description&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;reference-name&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Valid examples are: &lt;code>refs/heads/main&lt;/code>, &lt;code>refs/tags/v0.1.0&lt;/code>, &lt;code>refs/pull/420/head&lt;/code>,
&lt;code>refs/merge-requests/1/head&lt;/code>.&lt;/p>
&lt;p>This field takes precedence over
&lt;a href="#branch-example">&lt;code>.branch&lt;/code>&lt;/a>,
&lt;a href="#tag-example">&lt;code>.tag&lt;/code>&lt;/a>, and
&lt;a href="#semver-example">&lt;code>.semver&lt;/code>&lt;/a>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> Azure DevOps and AWS CodeCommit do not support fetching the HEAD of
a pull request. While Azure DevOps allows you to fetch the merge commit that
will be created after merging a PR (using &lt;code>refs/pull/&amp;lt;id&amp;gt;/merge&lt;/code>), this field
can only be used to fetch references that exist in the current state of the Git
repository and not references that will be created in the future.&lt;/p>
&lt;h4 id="commit-example">Commit example&lt;/h4>
&lt;p>To Git checkout a specified commit, use &lt;code>.spec.ref.commit&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>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>&amp;lt;repository-name&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">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">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">commit&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;commit SHA&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This field takes precedence over all other fields. It can be combined with
&lt;code>.spec.ref.branch&lt;/code> to perform a shallow clone of the branch, in which the
commit must exist:&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>&amp;lt;repository-name&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">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">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>&amp;lt;branch&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">commit&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;commit SHA within branch&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="verification">Verification&lt;/h3>
&lt;p>&lt;code>.spec.verify&lt;/code> is an optional field to enable the verification of Git commit
signatures. The field offers two subfields:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>&lt;code>.mode&lt;/code>, to specify what Git object(s) should be verified. Supported
values are:&lt;/p>
&lt;ul>
&lt;li>&lt;code>HEAD&lt;/code>: Verifies the commit object pointed to by the HEAD of the repository
after performing a checkout via &lt;code>.spec.ref&lt;/code>.&lt;/li>
&lt;li>&lt;code>head&lt;/code>: Same as &lt;code>HEAD&lt;/code>, supported for backwards compatibility purposes.&lt;/li>
&lt;li>&lt;code>Tag&lt;/code>: Verifies the tag object pointed to by the specified/inferred tag
reference in &lt;code>.spec.ref.tag&lt;/code>, &lt;code>.spec.ref.semver&lt;/code> or &lt;code>.spec.ref.name&lt;/code>.&lt;/li>
&lt;li>&lt;code>TagAndHEAD&lt;/code>: Verifies the tag object pointed to by the specified/inferred tag
reference in &lt;code>.spec.ref.tag&lt;/code>, &lt;code>.spec.ref.semver&lt;/code> or &lt;code>.spec.ref.name&lt;/code> and
the commit object pointed to by the tag.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>&lt;code>.secretRef.name&lt;/code>, to specify a reference to a Secret in the same namespace as
the GitRepository. Containing the (PGP) public keys of trusted Git authors.&lt;/p>
&lt;/li>
&lt;/ul>
&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>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>1m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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://github.com/stefanprodan/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">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;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">mode&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HEAD&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>pgp-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the verification succeeds, the controller adds a Condition with the
following attributes to the GitRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerifiedCondition&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;h4 id="verification-secret-example">Verification Secret example&lt;/h4>
&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>pgp-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">author1.asc&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">author2.asc&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Exporting armored public keys (&lt;code>.asc&lt;/code> files) using &lt;code>gpg&lt;/code>, and generating a
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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># Export armored public keys&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>gpg --export --armor 3CB12BA185C47B67 &amp;gt; author1.asc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>gpg --export --armor 6A7436E8790F8689 &amp;gt; author2.asc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># Generate secret&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>kubectl create secret generic pgp-public-keys &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> --from-file&lt;span style="color:#666">=&lt;/span>author1.asc &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> --from-file&lt;span style="color:#666">=&lt;/span>author2.asc &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> -o yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="ignore">Ignore&lt;/h3>
&lt;p>&lt;code>.spec.ignore&lt;/code> is an optional field to specify rules in
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code>
pattern format&lt;/a>. Paths
matching the defined rules are excluded while archiving.&lt;/p>
&lt;p>When specified, &lt;code>.spec.ignore&lt;/code> overrides the
&lt;a href="#default-exclusions">default exclusion
list&lt;/a>, and may overrule the
&lt;a href="#sourceignore-file">&lt;code>.sourceignore&lt;/code> file
exclusions&lt;/a>. See
&lt;a href="#excluding-files">excluding files&lt;/a>
for more information.&lt;/p>
&lt;h3 id="sparse-checkout">Sparse checkout&lt;/h3>
&lt;p>&lt;code>.spec.sparseCheckout&lt;/code> is an optional field to specify list of directories to
checkout when cloning the repository. If specified, only the specified directory
contents will be present in the artifact produced for this 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:#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>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">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://github.com/stefanprodan/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">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;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">sparseCheckout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- charts&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- kustomize&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspend">Suspend&lt;/h3>
&lt;p>&lt;code>.spec.suspend&lt;/code> is an optional field to suspend the reconciliation of a
GitRepository. When set to &lt;code>true&lt;/code>, the controller will stop reconciling the
GitRepository, and changes to the resource or in the Git repository will not
result in a new Artifact. When the field is set to &lt;code>false&lt;/code> or removed, it will
resume.&lt;/p>
&lt;h3 id="proxy-secret-reference">Proxy secret reference&lt;/h3>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> is an optional field used to specify the name of a
Secret that contains the proxy settings for the object. These settings are used
for all remote Git operations related to the GitRepository.
The Secret can contain three keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>address&lt;/code>, to specify the address of the proxy server. This is a required key.&lt;/li>
&lt;li>&lt;code>username&lt;/code>, to specify the username to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;li>&lt;code>password&lt;/code>, to specify the password to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;/ul>
&lt;p>The proxy server must be either HTTP/S or SOCKS5. You can use a SOCKS5 proxy
with a HTTP/S Git repository url.&lt;/p>
&lt;p>Examples:&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>http-proxy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>http://proxy.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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>mandalorian&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>grogu&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&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>ssh-proxy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>socks5://proxy.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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>mandalorian&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>grogu&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Proxying can also be configured in the source-controller Deployment directly by
using the standard environment variables such as &lt;code>HTTPS_PROXY&lt;/code>, &lt;code>ALL_PROXY&lt;/code>, etc.&lt;/p>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> takes precedence over all environment variables.&lt;/p>
&lt;h3 id="recurse-submodules">Recurse submodules&lt;/h3>
&lt;p>&lt;code>.spec.recurseSubmodules&lt;/code> is an optional field to enable the initialization of
all submodules within the cloned Git repository, using their default settings.
This option defaults to &lt;code>false&lt;/code>.&lt;/p>
&lt;p>Note that for most Git providers (e.g. GitHub and GitLab), deploy keys can not
be used as reusing a key across multiple repositories is not allowed. You have
to use either
&lt;a href="#basic-access-authentication">HTTPS token-based authentication&lt;/a>,
or an SSH key belonging to a (bot) user who has access to the main repository
and all submodules.&lt;/p>
&lt;h3 id="include">Include&lt;/h3>
&lt;p>&lt;code>.spec.include&lt;/code> is an optional field to map the contents of GitRepository
Artifacts into another. This may look identical to Git submodules but has
multiple benefits over regular submodules:&lt;/p>
&lt;ul>
&lt;li>Including a &lt;code>GitRepository&lt;/code> allows you to use different authentication
methods for different repositories.&lt;/li>
&lt;li>A change in the included repository will trigger an update of the including
repository.&lt;/li>
&lt;li>Multiple &lt;code>GitRepository&lt;/code> objects could include the same repository, which
decreases the amount of cloning done compared to using submodules.&lt;/li>
&lt;/ul>
&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>include-example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">include&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&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>other-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">fromPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>deploy/kubernetes&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">toPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>base/app&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>.fromPath&lt;/code> and &lt;code>.toPath&lt;/code> fields allow you to limit the files included, and
where they will be copied to. If you do not specify a value for &lt;code>.fromPath&lt;/code>,
all files from the referenced GitRepository Artifact will be included. The
&lt;code>.toPath&lt;/code> defaults to the &lt;code>.repository.name&lt;/code> (e.g. &lt;code>./other-repository/*&lt;/code>).&lt;/p>
&lt;h2 id="working-with-gitrepositories">Working with GitRepositories&lt;/h2>
&lt;h3 id="excluding-files">Excluding files&lt;/h3>
&lt;p>By default, files which match the
&lt;a href="#default-exclusions">default exclusion rules&lt;/a>
are excluded while archiving the Git repository contents as an Artifact. It is
possible to overwrite and/or overrule the default exclusions using a file in
the Git repository and/or an in-spec set of rules.&lt;/p>
&lt;h4 id="sourceignore-file">&lt;code>.sourceignore&lt;/code> file&lt;/h4>
&lt;p>Excluding files is possible by adding a &lt;code>.sourceignore&lt;/code> file in the Git
repository. The &lt;code>.sourceignore&lt;/code> file follows
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code> pattern
format&lt;/a>, and
pattern entries may overrule
&lt;a href="#default-exclusions">default exclusions&lt;/a>.&lt;/p>
&lt;p>The controller recursively loads ignore files so a &lt;code>.sourceignore&lt;/code> can be
placed in the repository root or in subdirectories.&lt;/p>
&lt;h4 id="ignore-spec">Ignore spec&lt;/h4>
&lt;p>Another option is to define the exclusions within the GitRepository spec, using
the
&lt;a href="#ignore">&lt;code>.spec.ignore&lt;/code> field&lt;/a>. Specified rules override the
&lt;a href="#default-exclusions">default
exclusion list&lt;/a>, and may overrule &lt;code>.sourceignore&lt;/code> file
exclusions.&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>&amp;lt;repository-name&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">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">ignore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> # exclude all
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&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"> # include deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> !/deploy
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> # exclude file extensions from deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.md
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.txt&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="triggering-a-reconcile">Triggering a reconcile&lt;/h3>
&lt;p>To manually tell the source-controller to reconcile a GitRepository outside the
&lt;a href="#interval">specified interval window&lt;/a>, a GitRepository can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the GitRepository for reconciliation if the &lt;code>&amp;lt;arbitrary-value&amp;gt;&lt;/code> differs
from the last value the controller acted on, as reported in
&lt;a href="#last-handled-reconcile-at">&lt;code>.status.lastHandledReconcileAt&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 annotate --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply --overwrite gitrepository/&amp;lt;repository-name&amp;gt; reconcile.fluxcd.io/requestedAt&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>date +%s&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux reconcile &lt;span style="color:#007020">source&lt;/span> git &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="waiting-for-ready">Waiting for &lt;code>Ready&lt;/code>&lt;/h3>
&lt;p>When a change is applied, it is possible to wait for the GitRepository to reach
a
&lt;a href="#ready-gitrepository">ready state&lt;/a> using &lt;code>kubectl&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 &lt;span style="color:#007020">wait&lt;/span> gitrepository/&amp;lt;repository-name&amp;gt; --for&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">condition&lt;/span>&lt;span style="color:#666">=&lt;/span>ready --timeout&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspending-and-resuming">Suspending and resuming&lt;/h3>
&lt;p>When you find yourself in a situation where you temporarily want to pause the
reconciliation of a GitRepository, you can suspend it using the
&lt;a href="#suspend">&lt;code>.spec.suspend&lt;/code> field&lt;/a>.&lt;/p>
&lt;h4 id="suspend-a-gitrepository">Suspend a GitRepository&lt;/h4>
&lt;p>In your YAML declaration:&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>&amp;lt;repository-name&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">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">suspend&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>Using &lt;code>kubectl&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 patch gitrepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34;: {\&amp;#34;suspend\&amp;#34; : true }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux &lt;span style="color:#007020">suspend&lt;/span> &lt;span style="color:#007020">source&lt;/span> git &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When a GitRepository has an Artifact and is suspended, and this
Artifact later disappears from the storage due to e.g. the source-controller
Pod being evicted from a Node, this will not be reflected in the
GitRepository&amp;rsquo;s Status until it is resumed.&lt;/p>
&lt;h4 id="resume-a-gitrepository">Resume a GitRepository&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the field:&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>&amp;lt;repository-name&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">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"># suspend: true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> Setting the field value to &lt;code>false&lt;/code> has the same effect as removing
it, but does not allow for &amp;ldquo;hot patching&amp;rdquo; using e.g. &lt;code>kubectl&lt;/code> while practicing
GitOps; as the manually applied patch would be overwritten by the declared
state in Git.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 patch gitrepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34; : {\&amp;#34;suspend\&amp;#34; : false }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux resume &lt;span style="color:#007020">source&lt;/span> git &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-a-gitrepository">Debugging a GitRepository&lt;/h3>
&lt;p>There are several ways to gather information about a GitRepository for
debugging purposes.&lt;/p>
&lt;h4 id="describe-the-gitrepository">Describe the GitRepository&lt;/h4>
&lt;p>Describing a GitRepository using
&lt;code>kubectl describe gitrepository &amp;lt;repository-name&amp;gt;&lt;/code>
displays the latest recorded information for the resource in the &lt;code>Status&lt;/code> and
&lt;code>Events&lt;/code> sections:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: processing object: new generation 1 -&amp;gt; 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: ProgressingWithRetry
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Reconciling
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to checkout and determine revision: unable to clone &amp;#39;https://github.com/stefanprodan/podinfo&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/invalid&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: GitOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: False
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to checkout and determine revision: unable to clone &amp;#39;https://github.com/stefanprodan/podinfo&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/invalid&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: GitOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: FetchFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning GitOperationFailed 2s (x9 over 4s) source-controller failed to checkout and determine revision: unable to clone &amp;#39;https://github.com/stefanprodan/podinfo&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/invalid&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="trace-emitted-events">Trace emitted Events&lt;/h4>
&lt;p>To view events for specific GitRepository(s), &lt;code>kubectl events&lt;/code> can be used in
combination with &lt;code>--for&lt;/code> to list the Events for specific objects. For example,
running&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 events --for GitRepository/&amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>lists&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2m14s Normal NewArtifact gitrepository/&amp;lt;repository-name&amp;gt; stored artifact for commit &amp;#39;Merge pull request #160 from stefanprodan/release-6.0.3&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">36s Normal ArtifactUpToDate gitrepository/&amp;lt;repository-name&amp;gt; artifact up-to-date with remote revision: &amp;#39;master@sha1:132f4e719209eb10b9485302f8593fc0e680f4fc&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">94s Warning GitOperationFailed gitrepository/&amp;lt;repository-name&amp;gt; failed to checkout and determine revision: unable to clone &amp;#39;https://github.com/stefanprodan/podinfo&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/invalid&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Besides being reported in Events, the reconciliation errors are also logged by
the controller. The Flux CLI offer commands for filtering the logs for a
specific GitRepository, e.g.
&lt;code>flux logs --level=error --kind=GitRepository --name=&amp;lt;repository-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h2 id="gitrepository-status">GitRepository Status&lt;/h2>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The GitRepository reports the latest synchronized state from the Git repository
as an Artifact object in the &lt;code>.status.artifact&lt;/code> of the resource.&lt;/p>
&lt;p>The Artifact file is a gzip compressed TAR archive (&lt;code>&amp;lt;commit sha&amp;gt;.tar.gz&lt;/code>), and
can be retrieved in-cluster from the &lt;code>.status.artifact.url&lt;/code> HTTP address.&lt;/p>
&lt;h4 id="artifact-example">Artifact example&lt;/h4>
&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>&amp;lt;repository-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:e750c7a46724acaef8f8aa926259af30bbd9face2ae065ae8896ba5ee5ab832b&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2022-01-29T06:59:23Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gitrepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>master@sha1:363a6a8fe6a7f13e05d34c163b0ef02a777da20a&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">91318&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.&amp;lt;namespace&amp;gt;.svc.cluster.local./gitrepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/363a6a8fe6a7f13e05d34c163b0ef02a777da20a.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="default-exclusions">Default exclusions&lt;/h4>
&lt;p>The following files and extensions are excluded from the Artifact by
default:&lt;/p>
&lt;ul>
&lt;li>Git files (&lt;code>.git/, .gitignore, .gitmodules, .gitattributes&lt;/code>)&lt;/li>
&lt;li>File extensions (&lt;code>.jpg, .jpeg, .gif, .png, .wmv, .flv, .tar.gz, .zip&lt;/code>)&lt;/li>
&lt;li>CI configs (&lt;code>.github/, .circleci/, .travis.yml, .gitlab-ci.yml, appveyor.yml, .drone.yml, cloudbuild.yaml, codeship-services.yml, codeship-steps.yml&lt;/code>)&lt;/li>
&lt;li>CLI configs (&lt;code>.goreleaser.yml, .sops.yaml&lt;/code>)&lt;/li>
&lt;li>Flux v1 config (&lt;code>.flux.yaml&lt;/code>)&lt;/li>
&lt;/ul>
&lt;p>To define your own exclusion rules, see
&lt;a href="#excluding-files">excluding files&lt;/a>.&lt;/p>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>A GitRepository enters various states during its lifecycle, reflected as
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">Kubernetes Conditions&lt;/a>.
It can be
&lt;a href="#reconciling-gitrepository">reconciling&lt;/a> while fetching the Git
state, it can be
&lt;a href="#ready-gitrepository">ready&lt;/a>, or it can
&lt;a href="#failed-gitrepository">fail during
reconciliation&lt;/a>.&lt;/p>
&lt;p>The GitRepository API is compatible with the
&lt;a href="https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus" target="_blank">kstatus specification&lt;/a>,
and reports &lt;code>Reconciling&lt;/code> and &lt;code>Stalled&lt;/code> conditions where applicable to
provide better (timeout) support to solutions polling the GitRepository to
become &lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-gitrepository">Reconciling GitRepository&lt;/h4>
&lt;p>The source-controller marks a GitRepository as &lt;em>reconciling&lt;/em> when one of the
following is true:&lt;/p>
&lt;ul>
&lt;li>There is no current Artifact for the GitRepository, or the reported Artifact
is determined to have disappeared from the storage.&lt;/li>
&lt;li>The generation of the GitRepository is newer than the
&lt;a href="#observed-generation">Observed
Generation&lt;/a>.&lt;/li>
&lt;li>The newly resolved Artifact revision differs from the current Artifact.&lt;/li>
&lt;/ul>
&lt;p>When the GitRepository is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status becomes
&lt;code>Unknown&lt;/code> when the controller detects drift, and the controller adds a Condition
with the following attributes to the GitRepository&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code> | &lt;code>reason: ProgressingWithRetry&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the reconciling state is due to a new revision, an additional Condition is
added with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactOutdated&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: NewRevision&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Both Conditions have a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and are only present on the GitRepository while their status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-gitrepository">Ready GitRepository&lt;/h4>
&lt;p>The source-controller marks a GitRepository as &lt;em>ready&lt;/em> when it has the
following characteristics:&lt;/p>
&lt;ul>
&lt;li>The GitRepository reports an
&lt;a href="#artifact">Artifact&lt;/a>.&lt;/li>
&lt;li>The reported Artifact exists in the controller&amp;rsquo;s Artifact storage.&lt;/li>
&lt;li>The controller was able to communicate with the remote Git repository using
the current spec.&lt;/li>
&lt;li>The revision of the reported Artifact is up-to-date with the latest
resolved revision of the remote Git repository.&lt;/li>
&lt;/ul>
&lt;p>When the GitRepository is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the
following attributes in the GitRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the
GitRepository is marked as
&lt;a href="#reconciling-gitrepository">reconciling&lt;/a>, or e.g. a
&lt;a href="#failed-gitrepository">transient error&lt;/a> occurs due to a temporary network issue.&lt;/p>
&lt;p>When the GitRepository Artifact is archived in the controller&amp;rsquo;s Artifact
storage, the controller sets a Condition with the following attributes in the
GitRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactInStorage&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>ArtifactInStorage&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until
the Artifact in the storage no longer exists.&lt;/p>
&lt;h4 id="failed-gitrepository">Failed GitRepository&lt;/h4>
&lt;p>The source-controller may get stuck trying to produce an Artifact for a
GitRepository without completing. This can occur due to some of the following
factors:&lt;/p>
&lt;ul>
&lt;li>The remote Git repository
&lt;a href="#url">URL&lt;/a> is temporarily unavailable.&lt;/li>
&lt;li>The Git repository does not exist.&lt;/li>
&lt;li>The
&lt;a href="#secret-reference">Secret reference&lt;/a> contains a reference to a
non-existing Secret.&lt;/li>
&lt;li>A specified Include is unavailable.&lt;/li>
&lt;li>The verification of the Git commit signature failed.&lt;/li>
&lt;li>The credentials in the referenced Secret are invalid.&lt;/li>
&lt;li>The GitRepository spec contains a generic misconfiguration.&lt;/li>
&lt;li>A storage related failure when storing the artifact.&lt;/li>
&lt;/ul>
&lt;p>When this happens, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
and adds a Condition with the following attributes to the GitRepository&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: FetchFailed&lt;/code> | &lt;code>type: IncludeUnavailable&lt;/code> | &lt;code>type: StorageOperationFailed&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AuthenticationFailed&lt;/code> | &lt;code>reason: GitOperationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This condition has a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and is only present on the GitRepository while the status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.
There may be more arbitrary values for the &lt;code>reason&lt;/code> field to provide accurate
reason for a condition.&lt;/p>
&lt;p>In addition to the above Condition types, when the
&lt;a href="#verification">verification of a Git commit signature&lt;/a> fails. A condition with
the following attributes is added to the GitRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerifiedCondition&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;False&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Failed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>While the GitRepository has one or more of these Conditions, the controller
will continue to attempt to produce an Artifact for the resource with an
exponential backoff, until it succeeds and the GitRepository is marked as
&lt;a href="#ready-gitrepository">ready&lt;/a>.&lt;/p>
&lt;p>Note that a GitRepository can be
&lt;a href="#reconciling-gitrepository">reconciling&lt;/a>
while failing at the same time, for example due to a newly introduced
configuration issue in the GitRepository spec. When a reconciliation fails, the
&lt;code>Reconciling&lt;/code> Condition reason would be &lt;code>ProgressingWithRetry&lt;/code>. When the
reconciliation is performed again after the failure, the reason is updated to
&lt;code>Progressing&lt;/code>.&lt;/p>
&lt;h3 id="observed-ignore">Observed Ignore&lt;/h3>
&lt;p>The source-controller reports an observed ignore in the GitRepository&amp;rsquo;s
&lt;code>.status.observedIgnore&lt;/code>. The observed ignore is the latest &lt;code>.spec.ignore&lt;/code> value
which resulted in a
&lt;a href="#ready-gitrepository">ready state&lt;/a>, or stalled due to error
it can not recover from without human intervention.
The value is the same as the
&lt;a href="#ignore">ignore in spec&lt;/a>.
It indicates the ignore rules used in building the current artifact in storage.
It is also used by the controller to determine if an artifact needs to be
rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedIgnore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> cue
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> pkg&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="observed-recurse-submodules">Observed Recurse Submodules&lt;/h3>
&lt;p>The source-controller reports an observed recurse submodule in the
GitRepository&amp;rsquo;s &lt;code>.status.observedRecurseSubmodules&lt;/code>. The observed recurse
submodules is the latest &lt;code>.spec.recurseSubmodules&lt;/code> value which resulted in a
&lt;a href="#ready-gitrepository">ready state&lt;/a>, or stalled due to error it can not recover
from without human intervention. The value is the same as the
&lt;a href="#recurse-submodules">recurse submodules in spec&lt;/a>. It indicates the recurse
submodules configuration used in building the current artifact in storage. It is
also used by the controller to determine if an artifact needs to be rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedRecurseSubmodules&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:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="observed-include">Observed Include&lt;/h3>
&lt;p>The source-controller reports observed include in the GitRepository&amp;rsquo;s
&lt;code>.status.observedInclude&lt;/code>. The observed include is the latest
&lt;code>.spec.recurseSubmodules&lt;/code> value which resulted in a
&lt;a href="#ready-gitrepository">ready state&lt;/a>, or stalled due to error it can not recover
from without human intervention. The value is the same as the
&lt;a href="#include">include in spec&lt;/a>. It indicates the include configuration used in
building the current artifact in storage. It is also used by the controller to
determine if an artifact needs to be rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedInclude&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">fromPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>deploy/webapp&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&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>repo1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">toPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>foo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">fromPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>deploy/secure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&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>repo2&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">toPath&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>bar&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="observed-sparse-checkout">Observed Sparse Checkout&lt;/h3>
&lt;p>The source-controller reports observed sparse checkout in the GitRepository&amp;rsquo;s
&lt;code>.status.observedSparseCheckout&lt;/code>. The observed sparse checkout is the latest
&lt;code>.spec.sparseCheckout&lt;/code> value which resulted in a
&lt;a href="#ready-gitrepository">ready
state&lt;/a>, or stalled due to error it can not recover from
without human intervention. The value is the same as the
&lt;a href="#sparse-checkout">sparseCheckout in
spec&lt;/a>. It indicates the sparse checkout configuration used in
building the current artifact in storage. It is also used by the controller to
determine if an artifact needs to be rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedSparseCheckout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- charts&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- kustomize&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="source-verification-mode">Source Verification Mode&lt;/h3>
&lt;p>The source-controller reports the Git object(s) it verified in the Git
repository to create an artifact in the GitRepository&amp;rsquo;s
&lt;code>.status.sourceVerificationMode&lt;/code>. This value is the same as the
&lt;a href="#verification">verification
mode in spec&lt;/a>. The verification status is applicable only to the
latest Git repository revision used to successfully build and store an
artifact.&lt;/p>
&lt;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The source-controller reports an
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">observed generation&lt;/a>
in the GitRepository&amp;rsquo;s &lt;code>.status.observedGeneration&lt;/code>. The observed generation is
the latest &lt;code>.metadata.generation&lt;/code> which resulted in either a
&lt;a href="#ready-gitrepository">ready state&lt;/a>,
or stalled due to error it can not recover from without human
intervention.&lt;/p>
&lt;h3 id="last-handled-reconcile-at">Last Handled Reconcile At&lt;/h3>
&lt;p>The source-controller reports the last &lt;code>reconcile.fluxcd.io/requestedAt&lt;/code>
annotation value it acted on in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;p>For practical information about this field, see
&lt;a href="#triggering-a-reconcile">triggering a
reconcile&lt;/a>.&lt;/p></description></item><item><title>Flux: OCI Repositories</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/ocirepositories/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/ocirepositories/</guid><description>
&lt;p>The &lt;code>OCIRepository&lt;/code> API defines a Source to produce an Artifact for an OCI
repository.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of an OCIRepository. It creates a tarball
(&lt;code>.tar.gz&lt;/code>) Artifact with the fetched data from an OCI repository for the
resolved digest.&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://ghcr.io/stefanprodan/manifests/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">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">tag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>latest&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>An OCIRepository named &lt;code>podinfo&lt;/code> is created, indicated by the
&lt;code>.metadata.name&lt;/code> field.&lt;/li>
&lt;li>The source-controller checks the OCI repository every five minutes, indicated
by the &lt;code>.spec.interval&lt;/code> field.&lt;/li>
&lt;li>It pulls the &lt;code>latest&lt;/code> tag of the &lt;code>ghcr.io/stefanprodan/manifests/podinfo&lt;/code>
repository, indicated by the &lt;code>.spec.ref.tag&lt;/code> and &lt;code>.spec.url&lt;/code> fields.&lt;/li>
&lt;li>The resolved tag and SHA256 digest is used as the Artifact
revision, reported in-cluster in the &lt;code>.status.artifact.revision&lt;/code> field.&lt;/li>
&lt;li>When the current OCIRepository digest differs from the latest fetched
digest, a new Artifact is archived.&lt;/li>
&lt;li>The new Artifact is reported in the &lt;code>.status.artifact&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>You can run this example by saving the manifest into &lt;code>ocirepository.yaml&lt;/code>.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f ocirepository.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get ocirepository&lt;/code> to see the OCIRepository:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME URL AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo oci://ghcr.io/stefanprodan/manifests/podinfo 5s True stored artifact with revision &amp;#39;latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl describe ocirepository podinfo&lt;/code> to see the
&lt;a href="#artifact">Artifact&lt;/a>
and
&lt;a href="#conditions">Conditions&lt;/a> in the OCIRepository&amp;rsquo;s 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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Artifact:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Digest: sha256:d7e924b4882e55b97627355c7b3d2e711e9b54303afa2f50c25377f4df66a83b
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Update Time: 2025-06-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Path: ocirepository/default/podinfo/3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Revision: latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Size: 1105
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./ocirepository/oci/podinfo/3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2025-06-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2025-06-14T11:23:36Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: ArtifactInStorage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./gitrepository/default/podinfo/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal NewArtifact 62s source-controller stored artifact with revision &amp;#39;latest/3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39; from &amp;#39;oci://ghcr.io/stefanprodan/manifests/podinfo&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="writing-an-ocirepository-spec">Writing an OCIRepository spec&lt;/h2>
&lt;p>As with all other Kubernetes config, an OCIRepository needs &lt;code>apiVersion&lt;/code>,
&lt;code>kind&lt;/code>, and &lt;code>metadata&lt;/code> fields. The name of an OCIRepository object must be a
valid
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names#dns-subdomain-names" target="_blank">DNS subdomain name&lt;/a>.&lt;/p>
&lt;p>An OCIRepository also needs a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" target="_blank">&lt;code>.spec&lt;/code> section&lt;/a>.&lt;/p>
&lt;h3 id="url">URL&lt;/h3>
&lt;p>&lt;code>.spec.url&lt;/code> is a required field that specifies the address of the
container image repository in the format &lt;code>oci://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;org-name&amp;gt;/&amp;lt;repo-name&amp;gt;&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> that specifying a tag or digest is not acceptable for this field.&lt;/p>
&lt;h3 id="provider">Provider&lt;/h3>
&lt;p>&lt;code>.spec.provider&lt;/code> is an optional field that allows specifying an OIDC provider used for
authentication purposes.&lt;/p>
&lt;p>Supported options are:&lt;/p>
&lt;ul>
&lt;li>&lt;code>generic&lt;/code>&lt;/li>
&lt;li>&lt;code>aws&lt;/code>&lt;/li>
&lt;li>&lt;code>azure&lt;/code>&lt;/li>
&lt;li>&lt;code>gcp&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>generic&lt;/code> provider can be used for public repositories or when
static credentials are used for authentication, either with
&lt;code>spec.secretRef&lt;/code> or &lt;code>spec.serviceAccountName&lt;/code>.
If you do not specify &lt;code>.spec.provider&lt;/code>, it defaults to &lt;code>generic&lt;/code>.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h4 id="aws">AWS&lt;/h4>
&lt;p>The &lt;code>aws&lt;/code> provider can be used to authenticate automatically using the EKS
worker node IAM role or IAM Role for Service Accounts (IRSA), and by extension
gain access to ECR.&lt;/p>
&lt;p>When the worker node IAM role has access to ECR, source-controller running on it
will also have access to ECR.&lt;/p>
&lt;p>When using IRSA to enable access to ECR, add the following patch to your
bootstrap repository, in the &lt;code>flux-system/kustomization.yaml&lt;/code> 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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> eks.amazonaws.com/role-arn: &amp;lt;role arn&amp;gt;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">target&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>source-controller&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that you can attach the AWS managed policy &lt;code>arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly&lt;/code>
to the IAM role when using IRSA.&lt;/p>
&lt;h4 id="azure">Azure&lt;/h4>
&lt;p>The &lt;code>azure&lt;/code> provider can be used to authenticate automatically using Workload Identity and Kubelet Managed
Identity to gain access to ACR.&lt;/p>
&lt;h5 id="kubelet-managed-identity">Kubelet Managed Identity&lt;/h5>
&lt;p>When the kubelet managed identity has access to ACR, source-controller running
on it will also have access to ACR.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> If you have more than one identity configured on the cluster, you have to specify which one to use
by setting the &lt;code>AZURE_CLIENT_ID&lt;/code> environment variable in the source-controller deployment.&lt;/p>
&lt;p>If you are running into further issues, please look at the
&lt;a href="https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/TROUBLESHOOTING.md#azure-virtual-machine-managed-identity" target="_blank">troubleshooting guide&lt;/a>.&lt;/p>
&lt;h5 id="workload-identity">Workload Identity&lt;/h5>
&lt;p>When using Workload Identity to enable access to ACR, add the following patch to
your bootstrap repository, in the &lt;code>flux-system/kustomization.yaml&lt;/code> 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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/client-id: &amp;lt;AZURE_CLIENT_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &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">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: apps/v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: Deployment
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> spec:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> template:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Ensure Workload Identity is properly set up on your cluster and the mutating webhook is installed.
Create an identity that has access to ACR. Next, establish
a federated identity between the source-controller ServiceAccount and the
identity. Patch the source-controller Deployment and ServiceAccount as shown in the patch
above. Please take a look at this
&lt;a href="https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject" target="_blank">guide&lt;/a>.&lt;/p>
&lt;h4 id="gcp">GCP&lt;/h4>
&lt;p>The &lt;code>gcp&lt;/code> provider can be used to authenticate automatically using OAuth scopes
or Workload Identity, and by extension gain access to GCR or Artifact Registry.&lt;/p>
&lt;p>When the GKE nodes have the appropriate OAuth scope for accessing GCR and
Artifact Registry, source-controller running on it will also have access to them.&lt;/p>
&lt;p>When using Workload Identity to enable access to GCR or Artifact Registry, add
the following patch to your bootstrap repository, in the
&lt;code>flux-system/kustomization.yaml&lt;/code> 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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> iam.gke.io/gcp-service-account: &amp;lt;identity-name&amp;gt;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">target&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>source-controller&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The Artifact Registry service uses the permission &lt;code>artifactregistry.repositories.downloadArtifacts&lt;/code>
that is located under the Artifact Registry Reader role. If you are using
Google Container Registry service, the needed permission is instead &lt;code>storage.objects.list&lt;/code>
which can be bound as part of the Container Registry Service Agent role.
Take a look at
&lt;a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" target="_blank">this guide&lt;/a>
for more information about setting up GKE Workload Identity.&lt;/p>
&lt;h3 id="secret-reference">Secret reference&lt;/h3>
&lt;p>&lt;code>.spec.secretRef.name&lt;/code> is an optional field to specify a name reference to a
Secret in the same namespace as the OCIRepository, containing authentication
credentials for the OCI repository.&lt;/p>
&lt;p>This secret is expected to be in the same format as
&lt;a href="https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod" target="_blank">&lt;code>imagePullSecrets&lt;/code>&lt;/a>.
The usual way to create such a secret is 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>kubectl create secret docker-registry ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="service-account-reference">Service Account reference&lt;/h3>
&lt;p>&lt;code>.spec.serviceAccountName&lt;/code> is an optional field to specify a Service Account
in the same namespace as OCIRepository with purpose depending on the value of
the &lt;code>.spec.provider&lt;/code> field:&lt;/p>
&lt;ul>
&lt;li>When &lt;code>.spec.provider&lt;/code> is set to &lt;code>generic&lt;/code>, the controller will fetch the image
pull secrets attached to the Service Account and use them for authentication.&lt;/li>
&lt;li>When &lt;code>.spec.provider&lt;/code> is set to &lt;code>aws&lt;/code>, &lt;code>azure&lt;/code>, or &lt;code>gcp&lt;/code>, the Service Account
will be used for Workload Identity authentication. In this case, the controller
feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must be enabled, otherwise the
controller will error out.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Note:&lt;/strong> that for a publicly accessible image repository, you don&amp;rsquo;t need to
provide a &lt;code>secretRef&lt;/code> nor &lt;code>serviceAccountName&lt;/code>.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h3 id="mutual-tls-authentication">Mutual TLS Authentication&lt;/h3>
&lt;p>&lt;code>.spec.certSecretRef.name&lt;/code> is an optional field to specify a secret containing
TLS certificate data for mutual TLS authentication.&lt;/p>
&lt;p>To authenticate towards an OCI repository using mutual TLS,
the referenced Secret&amp;rsquo;s &lt;code>.data&lt;/code> should contain the following keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tls.crt&lt;/code> and &lt;code>tls.key&lt;/code>, to specify the client certificate and private key used
for TLS client authentication. These must be used in conjunction, i.e.
specifying one without the other will lead to an error.&lt;/li>
&lt;li>&lt;code>ca.crt&lt;/code>, to specify the CA certificate used to verify the server, which is
required if the server is using a self-signed certificate.&lt;/li>
&lt;/ul>
&lt;p>The Secret should be of type &lt;code>Opaque&lt;/code> or &lt;code>kubernetes.io/tls&lt;/code>. All the files in
the Secret are expected to be
&lt;a href="https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail" target="_blank">PEM-encoded&lt;/a>. Assuming you have
three files; &lt;code>client.key&lt;/code>, &lt;code>client.crt&lt;/code> and &lt;code>ca.crt&lt;/code> for the client private key,
client certificate and the CA certificate respectively, you can generate the
required Secret using the &lt;code>flux create secret tls&lt;/code> command:&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 secret tls --tls-key-file&lt;span style="color:#666">=&lt;/span>client.key --tls-crt-file&lt;span style="color:#666">=&lt;/span>client.crt --ca-crt-file&lt;span style="color:#666">=&lt;/span>ca.crt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Example usage:&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://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">certSecretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example-tls&lt;span style="color:#bbb">
&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>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>example-tls&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kubernetes.io/tls&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># or Opaque&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">tls.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">tls.key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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"># NOTE: Can be supplied without the above 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">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="proxy-secret-reference">Proxy secret reference&lt;/h3>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> is an optional field used to specify the name of a
Secret that contains the proxy settings for the object. These settings are used
for all the remote operations related to the OCIRepository.
The Secret can contain three keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>address&lt;/code>, to specify the address of the proxy server. This is a required key.&lt;/li>
&lt;li>&lt;code>username&lt;/code>, to specify the username to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;li>&lt;code>password&lt;/code>, to specify the password to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;/ul>
&lt;p>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:#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>http-proxy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>http://proxy.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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>mandalorian&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>grogu&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Proxying can also be configured in the source-controller Deployment directly by
using the standard environment variables such as &lt;code>HTTPS_PROXY&lt;/code>, &lt;code>ALL_PROXY&lt;/code>, etc.&lt;/p>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> takes precedence over all environment variables.&lt;/p>
&lt;p>&lt;strong>Warning:&lt;/strong>
&lt;a href="https://github.com/sigstore/cosign" target="_blank">Cosign&lt;/a> &lt;em>keyless&lt;/em>
&lt;a href="#verification">verification&lt;/a> is not supported for this API. If you
require cosign keyless verification to use a proxy you must use the
standard environment variables mentioned above. If you specify a
&lt;code>proxySecretRef&lt;/code> the controller will simply send out the requests
needed for keyless verification without the associated object-level
proxy settings.&lt;/p>
&lt;h3 id="insecure">Insecure&lt;/h3>
&lt;p>&lt;code>.spec.insecure&lt;/code> is an optional field to allow connecting to an insecure (HTTP)
container registry server, if set to &lt;code>true&lt;/code>. The default value is &lt;code>false&lt;/code>,
denying insecure (HTTP) connections.&lt;/p>
&lt;h3 id="interval">Interval&lt;/h3>
&lt;p>&lt;code>.spec.interval&lt;/code> is a required field that specifies the interval at which the
OCI repository must be fetched.&lt;/p>
&lt;p>After successfully reconciling the object, the source-controller requeues it
for inspection after the specified interval. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>10m0s&lt;/code> to reconcile the object every 10 minutes.&lt;/p>
&lt;p>If the &lt;code>.metadata.generation&lt;/code> of a resource changes (due to e.g. a change to
the spec), this is handled instantly outside the interval window.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple OCIRepository objects are
set up with the same interval. For more information, please refer to the
&lt;a href="https://fluxcd.io/flux/components/source/options/" target="_blank">source-controller configuration options&lt;/a>.&lt;/p>
&lt;h3 id="timeout">Timeout&lt;/h3>
&lt;p>&lt;code>.spec.timeout&lt;/code> is an optional field to specify a timeout for OCI operations
like pulling. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>1m30s&lt;/code> for a timeout of one minute and thirty seconds. The default value
is &lt;code>60s&lt;/code>.&lt;/p>
&lt;h3 id="reference">Reference&lt;/h3>
&lt;p>&lt;code>.spec.ref&lt;/code> is an optional field to specify the OCI reference to resolve and
watch for changes. References are specified in one or more subfields
(&lt;code>.tag&lt;/code>, &lt;code>.semver&lt;/code>, &lt;code>.digest&lt;/code>), with latter listed fields taking
precedence over earlier ones. If not specified, it defaults to the &lt;code>latest&lt;/code>
tag.&lt;/p>
&lt;h4 id="tag-example">Tag example&lt;/h4>
&lt;p>To pull a specific tag, use &lt;code>.spec.ref.tag&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>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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">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">tag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;tag-name&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="semver-example">SemVer example&lt;/h4>
&lt;p>To pull a tag based on a
&lt;a href="https://github.com/Masterminds/semver#checking-version-constraints" target="_blank">SemVer range&lt;/a>,
use &lt;code>.spec.ref.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:#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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">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:#60a0b0;font-style:italic"># SemVer range reference: https://github.com/Masterminds/semver#checking-version-constraints&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;semver-range&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This field takes precedence over
&lt;a href="#tag-example">&lt;code>.tag&lt;/code>&lt;/a>.&lt;/p>
&lt;h4 id="semverfilter-example">SemverFilter example&lt;/h4>
&lt;p>&lt;code>.spec.ref.semverFilter&lt;/code> is an optional field to specify a SemVer filter to apply
when fetching tags from the OCI repository. The filter is a regular expression
that is applied to the tags fetched from the repository. Only tags that match
the filter are considered for the semver range resolution.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The filter is only taken into account when the &lt;code>.spec.ref.semver&lt;/code> field
is set.&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://ghcr.io/stefanprodan/manifests/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">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:#60a0b0;font-style:italic"># SemVer comparisons using constraints without a prerelease comparator will skip prerelease versions.&lt;/span>&lt;span style="color:#bbb">
&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"># Adding a `-0` suffix to the semver range will include prerelease versions.&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;gt;= 6.1.x-0&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semverFilter&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;.*-rc.*&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example, the controller fetches tags from the &lt;code>ghcr.io/stefanprodan/manifests/podinfo&lt;/code>
repository and filters them using the regular expression &lt;code>.*-rc.*&lt;/code>. Only tags that
contain the &lt;code>-rc&lt;/code> suffix are considered for the semver range resolution.&lt;/p>
&lt;h4 id="digest-example">Digest example&lt;/h4>
&lt;p>To pull a specific digest, use &lt;code>.spec.ref.digest&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>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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">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">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;sha256:&amp;lt;SHA-value&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This field takes precedence over all other fields.&lt;/p>
&lt;h3 id="layer-selector">Layer selector&lt;/h3>
&lt;p>&lt;code>spec.layerSelector&lt;/code> is an optional field to specify which layer should be extracted from the OCI Artifact.
If not specified, the controller will extract the first layer found in the artifact.&lt;/p>
&lt;p>To extract a layer matching a specific
&lt;a href="https://github.com/opencontainers/image-spec/blob/v1.0.2/media-types.md" target="_blank">OCI media type&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">layerSelector&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">mediaType&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;application/vnd.cncf.helm.chart.content.v1.tar+gzip&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">operation&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>extract&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># can be &amp;#39;extract&amp;#39; or &amp;#39;copy&amp;#39;, defaults to &amp;#39;extract&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If the layer selector matches more than one layer, the first layer matching the specified media type will be used.
Note that the selected OCI layer must be
&lt;a href="https://github.com/opencontainers/image-spec/blob/v1.0.2/layer.md#gzip-media-types" target="_blank">compressed&lt;/a>
in the &lt;code>tar+gzip&lt;/code> format.&lt;/p>
&lt;p>When &lt;code>.spec.layerSelector.operation&lt;/code> is set to &lt;code>copy&lt;/code>, instead of extracting the
compressed layer, the controller copies the tarball as-is to storage, thus
keeping the original content unaltered.&lt;/p>
&lt;h3 id="ignore">Ignore&lt;/h3>
&lt;p>&lt;code>.spec.ignore&lt;/code> is an optional field to specify rules in
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code>
pattern format&lt;/a>. Paths
matching the defined rules are excluded while archiving.&lt;/p>
&lt;p>When specified, &lt;code>.spec.ignore&lt;/code> overrides the
&lt;a href="#default-exclusions">default exclusion
list&lt;/a>, and may overrule the
&lt;a href="#sourceignore-file">&lt;code>.sourceignore&lt;/code> file
exclusions&lt;/a>. See
&lt;a href="#excluding-files">excluding files&lt;/a>
for more information.&lt;/p>
&lt;h3 id="verification">Verification&lt;/h3>
&lt;p>&lt;code>.spec.verify&lt;/code> is an optional field to enable the verification of
&lt;a href="https://github.com/sigstore/cosign" target="_blank">Cosign&lt;/a>
or
&lt;a href="https://github.com/notaryproject/notation" target="_blank">Notation&lt;/a>
signatures. The field offers three subfields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.provider&lt;/code>, to specify the verification provider. The supported options are &lt;code>cosign&lt;/code> and &lt;code>notation&lt;/code> at present.&lt;/li>
&lt;li>&lt;code>.secretRef.name&lt;/code>, to specify a reference to a Secret in the same namespace as
the OCIRepository, containing the Cosign public keys of trusted authors. For Notation this Secret should also
include the
&lt;a href="https://github.com/notaryproject/specifications/blob/v1.0.0/specs/trust-store-trust-policy.md#trust-policy" target="_blank">trust policy&lt;/a> in
addition to the CA certificate.&lt;/li>
&lt;li>&lt;code>.matchOIDCIdentity&lt;/code>, to specify a list of OIDC identity matchers (only supported when using &lt;code>cosign&lt;/code> as the
verification provider). Please see
&lt;a href="#keyless-verification">Keyless verification&lt;/a> for more details.&lt;/li>
&lt;/ul>
&lt;h4 id="cosign">Cosign&lt;/h4>
&lt;p>The &lt;code>cosign&lt;/code> provider can be used to verify the signature of an OCI artifact using either a known public key
or via the
&lt;a href="https://github.com/sigstore/cosign/blob/main/KEYLESS.md" target="_blank">Cosign Keyless&lt;/a> procedure.&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>cosign&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>cosign-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the verification succeeds, the controller adds a Condition with the
following attributes to the OCIRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;h5 id="public-keys-verification">Public keys verification&lt;/h5>
&lt;p>To verify the authenticity of an OCI artifact, create a Kubernetes secret
with the Cosign public keys:&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>cosign-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">key1.pub&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">key2.pub&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that the keys must have the &lt;code>.pub&lt;/code> extension for Flux to make use of them.&lt;/p>
&lt;p>Flux will loop over the public keys and use them to verify an artifact&amp;rsquo;s signature.
This allows for older artifacts to be valid as long as the right key is in the secret.&lt;/p>
&lt;h5 id="keyless-verification">Keyless verification&lt;/h5>
&lt;p>For publicly available OCI artifacts, which are signed using the
&lt;a href="https://github.com/sigstore/cosign/blob/main/KEYLESS.md" target="_blank">Cosign Keyless&lt;/a> procedure,
you can enable the verification by omitting the &lt;code>.verify.secretRef&lt;/code> field.&lt;/p>
&lt;p>To verify the identity&amp;rsquo;s subject and the OIDC issuer present in the Fulcio
certificate, you can specify a list of OIDC identity matchers using
&lt;code>.spec.verify.matchOIDCIdentity&lt;/code>. The matcher provides two required fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.issuer&lt;/code>, to specify a regexp that matches against the OIDC issuer.&lt;/li>
&lt;li>&lt;code>.subject&lt;/code>, to specify a regexp that matches against the subject identity in
the certificate.
Both values should follow the
&lt;a href="https://golang.org/s/re2syntax" target="_blank">Go regular expression syntax&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>The matchers are evaluated in an OR fashion, i.e. the identity is deemed to be
verified if any one matcher successfully matches against the identity.&lt;/p>
&lt;p>Example of verifying artifacts signed by the
&lt;a href="https://github.com/sigstore/cosign-installer" target="_blank">Cosign GitHub Action&lt;/a> with GitHub OIDC 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-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>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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">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">url&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>oci://ghcr.io/stefanprodan/manifests/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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>cosign&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">matchOIDCIdentity&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">issuer&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;^https://token.actions.githubusercontent.com$&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">subject&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;^https://github.com/stefanprodan/podinfo.*$&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The controller verifies the signatures using the Fulcio root CA and the Rekor
instance hosted at
&lt;a href="https://rekor.sigstore.dev/" target="_blank">rekor.sigstore.dev&lt;/a>.&lt;/p>
&lt;p>Note that keyless verification is an &lt;strong>experimental feature&lt;/strong>, using
custom root CAs or self-hosted Rekor instances are not currently supported.&lt;/p>
&lt;h4 id="notation">Notation&lt;/h4>
&lt;p>The &lt;code>notation&lt;/code> provider can be used to verify the signature of an OCI artifact using known
trust policy and CA certificate.&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>notation-config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the verification succeeds, the controller adds a Condition with the
following attributes to the OCIRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>To verify the authenticity of an OCI artifact, create a Kubernetes secret
containing Certificate Authority (CA) root certificates and the a &lt;code>trust policy&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>notation-config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">certificate1.pem&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">certificate2.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">trustpolicy.json&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that the CA certificates must have either &lt;code>.pem&lt;/code> or &lt;code>.crt&lt;/code> extension and your trust policy must
be named &lt;code>trustpolicy.json&lt;/code> for Flux to make use of them.&lt;/p>
&lt;p>For more information on the signing and verification process see
&lt;a href="https://github.com/notaryproject/specifications/blob/v1.0.0/specs/signing-and-verification-workflow.md" target="_blank">Signing and Verification Workflow&lt;/a>.&lt;/p>
&lt;p>Flux will loop over the certificates and use them to verify an artifact&amp;rsquo;s signature.
This allows for older artifacts to be valid as long as the right certificate is in the secret.&lt;/p>
&lt;h3 id="suspend">Suspend&lt;/h3>
&lt;p>&lt;code>.spec.suspend&lt;/code> is an optional field to suspend the reconciliation of a
OCIRepository. When set to &lt;code>true&lt;/code>, the controller will stop reconciling the
OCIRepository, and changes to the resource or in the OCI repository will not
result in a new Artifact. When the field is set to &lt;code>false&lt;/code> or removed, it will
resume.&lt;/p>
&lt;h2 id="working-with-ocirepositories">Working with OCIRepositories&lt;/h2>
&lt;h3 id="excluding-files">Excluding files&lt;/h3>
&lt;p>By default, files which match the
&lt;a href="#default-exclusions">default exclusion rules&lt;/a>
are excluded while archiving the OCI repository contents as an Artifact.
It is possible to overwrite and/or overrule the default exclusions using
the
&lt;a href="#ignore">&lt;code>.spec.ignore&lt;/code> field&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">ignore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> # exclude all
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&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"> # include deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> !/deploy
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> # exclude file extensions from deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.md
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.txt&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="sourceignore-file">&lt;code>.sourceignore&lt;/code> file&lt;/h4>
&lt;p>Excluding files is possible by adding a &lt;code>.sourceignore&lt;/code> file in the artifact.
The &lt;code>.sourceignore&lt;/code> file follows
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code> pattern
format&lt;/a>, and pattern
entries may overrule
&lt;a href="#default-exclusions">default exclusions&lt;/a>.&lt;/p>
&lt;p>The controller recursively loads ignore files so a &lt;code>.sourceignore&lt;/code> can be
placed in the artifact root or in subdirectories.&lt;/p>
&lt;h3 id="triggering-a-reconcile">Triggering a reconcile&lt;/h3>
&lt;p>To manually tell the source-controller to reconcile a OCIRepository outside the
&lt;a href="#interval">specified interval window&lt;/a>, an OCIRepository can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the OCIRepository for reconciliation if the &lt;code>&amp;lt;arbitrary-value&amp;gt;&lt;/code> differs
from the last value the controller acted on, as reported in
&lt;a href="#last-handled-reconcile-at">&lt;code>.status.lastHandledReconcileAt&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 annotate --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply --overwrite ocirepository/&amp;lt;repository-name&amp;gt; reconcile.fluxcd.io/requestedAt&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>date +%s&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux reconcile &lt;span style="color:#007020">source&lt;/span> oci &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="waiting-for-ready">Waiting for &lt;code>Ready&lt;/code>&lt;/h3>
&lt;p>When a change is applied, it is possible to wait for the OCIRepository to reach
a
&lt;a href="#ready-ocirepository">ready state&lt;/a> using &lt;code>kubectl&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 &lt;span style="color:#007020">wait&lt;/span> gitrepository/&amp;lt;repository-name&amp;gt; --for&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">condition&lt;/span>&lt;span style="color:#666">=&lt;/span>ready --timeout&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspending-and-resuming">Suspending and resuming&lt;/h3>
&lt;p>When you find yourself in a situation where you temporarily want to pause the
reconciliation of an OCIRepository, you can suspend it using the
&lt;a href="#suspend">&lt;code>.spec.suspend&lt;/code> field&lt;/a>.&lt;/p>
&lt;h4 id="suspend-an-ocirepository">Suspend an OCIRepository&lt;/h4>
&lt;p>In your YAML declaration:&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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">suspend&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>Using &lt;code>kubectl&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 patch ocirepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34;: {\&amp;#34;suspend\&amp;#34; : true }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux &lt;span style="color:#007020">suspend&lt;/span> &lt;span style="color:#007020">source&lt;/span> oci &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When an OCIRepository has an Artifact and it is suspended, and this
Artifact later disappears from the storage due to e.g. the source-controller
Pod being evicted from a Node, this will not be reflected in the
OCIRepository&amp;rsquo;s Status until it is resumed.&lt;/p>
&lt;h4 id="resume-an-ocirepository">Resume an OCIRepository&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the field:&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">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"># suspend: true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> Setting the field value to &lt;code>false&lt;/code> has the same effect as removing
it, but does not allow for &amp;ldquo;hot patching&amp;rdquo; using e.g. &lt;code>kubectl&lt;/code> while practicing
GitOps; as the manually applied patch would be overwritten by the declared
state in Git.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 patch ocirepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34; : {\&amp;#34;suspend\&amp;#34; : false }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux resume &lt;span style="color:#007020">source&lt;/span> oci &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-an-ocirepository">Debugging an OCIRepository&lt;/h3>
&lt;p>There are several ways to gather information about a OCIRepository for
debugging purposes.&lt;/p>
&lt;h4 id="describe-the-ocirepository">Describe the OCIRepository&lt;/h4>
&lt;p>Describing an OCIRepository using
&lt;code>kubectl describe ocirepository &amp;lt;repository-name&amp;gt;&lt;/code>
displays the latest recorded information for the resource in the &lt;code>Status&lt;/code> and
&lt;code>Events&lt;/code> sections:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2025-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: processing object: new generation 1 -&amp;gt; 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: ProgressingWithRetry
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Reconciling
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2025-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to pull artifact from &amp;#39;oci://ghcr.io/stefanprodan/manifests/podinfo&amp;#39;: couldn&amp;#39;t find tag &amp;#34;0.0.1&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: OCIOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: False
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2025-02-14T09:40:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to pull artifact from &amp;#39;oci://ghcr.io/stefanprodan/manifests/podinfo&amp;#39;: couldn&amp;#39;t find tag &amp;#34;0.0.1&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: OCIOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: FetchFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./ocirepository/default/podinfo/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning OCIOperationFailed 2s (x9 over 4s) source-controller failed to pull artifact from &amp;#39;oci://ghcr.io/stefanprodan/manifests/podinfo&amp;#39;: couldn&amp;#39;t find tag &amp;#34;0.0.1&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="trace-emitted-events">Trace emitted Events&lt;/h4>
&lt;p>To view events for specific OCIRepository(s), &lt;code>kubectl events&lt;/code> can be used
in combination with &lt;code>--for&lt;/code> to list the Events for specific objects. For
example, running&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 events --for OCIRepository/&amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>lists&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2m14s Normal NewArtifact ocirepository/&amp;lt;repository-name&amp;gt; stored artifact for revision &amp;#39;latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">36s Normal ArtifactUpToDate ocirepository/&amp;lt;repository-name&amp;gt; artifact up-to-date with remote revision: &amp;#39;latest@sha256:3b6cdcc7adcc9a84d3214ee1c029543789d90b5ae69debe9efa3f66e982875de&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">94s Warning OCIOperationFailed ocirepository/&amp;lt;repository-name&amp;gt; failed to pull artifact from &amp;#39;oci://ghcr.io/stefanprodan/manifests/podinfo&amp;#39;: couldn&amp;#39;t find tag &amp;#34;0.0.1&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Besides being reported in Events, the reconciliation errors are also logged by
the controller. The Flux CLI offer commands for filtering the logs for a
specific OCIRepository, e.g.
&lt;code>flux logs --level=error --kind=OCIRepository --name=&amp;lt;repository-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h2 id="ocirepository-status">OCIRepository Status&lt;/h2>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The OCIRepository reports the latest synchronized state from the OCI repository
as an Artifact object in the &lt;code>.status.artifact&lt;/code> of the resource.&lt;/p>
&lt;p>The &lt;code>.status.artifact.revision&lt;/code> holds the tag and SHA256 digest of the upstream OCI artifact.&lt;/p>
&lt;p>The &lt;code>.status.artifact.metadata&lt;/code> holds the upstream OCI artifact metadata such as the
&lt;a href="https://github.com/opencontainers/image-spec/blob/main/annotations.md" target="_blank">OpenContainers standard annotations&lt;/a>.
If the OCI artifact was created with &lt;code>flux push artifact&lt;/code>, then the &lt;code>metadata&lt;/code> will contain the following
annotations:&lt;/p>
&lt;ul>
&lt;li>&lt;code>org.opencontainers.image.created&lt;/code> the date and time on which the artifact was built&lt;/li>
&lt;li>&lt;code>org.opencontainers.image.source&lt;/code> the URL of the Git repository containing the source files&lt;/li>
&lt;li>&lt;code>org.opencontainers.image.revision&lt;/code> the Git branch and commit SHA1 of the source files&lt;/li>
&lt;/ul>
&lt;p>The Artifact file is a gzip compressed TAR archive (&lt;code>&amp;lt;commit sha&amp;gt;.tar.gz&lt;/code>), and
can be retrieved in-cluster from the &lt;code>.status.artifact.url&lt;/code> HTTP address.&lt;/p>
&lt;h4 id="artifact-example">Artifact example&lt;/h4>
&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>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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;repository-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:9f3bc0f341d4ecf2bab460cc59320a2a9ea292f01d7b96e32740a9abfd341088&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2025-08-08T09:35:45Z&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">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">org.opencontainers.image.created&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2025-08-08T12:31:41+03:00&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">org.opencontainers.image.revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">6.1.8&lt;/span>/b3b00fe35424a45d373bf4c7214178bc36fd7872&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">org.opencontainers.image.source&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://github.com/stefanprodan/podinfo.git&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ocirepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/&amp;lt;digest&amp;gt;.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;tag&amp;gt;@&amp;lt;digest&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">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">1105&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.&amp;lt;namespace&amp;gt;.svc.cluster.local./ocirepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/&amp;lt;digest&amp;gt;.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="default-exclusions">Default exclusions&lt;/h4>
&lt;p>The following files and extensions are excluded from the Artifact by
default:&lt;/p>
&lt;ul>
&lt;li>Git files (&lt;code>.git/, .gitignore, .gitmodules, .gitattributes&lt;/code>)&lt;/li>
&lt;li>File extensions (&lt;code>.jpg, .jpeg, .gif, .png, .wmv, .flv, .tar.gz, .zip&lt;/code>)&lt;/li>
&lt;li>CI configs (&lt;code>.github/, .circleci/, .travis.yml, .gitlab-ci.yml, appveyor.yml, .drone.yml, cloudbuild.yaml, codeship-services.yml, codeship-steps.yml&lt;/code>)&lt;/li>
&lt;li>CLI configs (&lt;code>.goreleaser.yml, .sops.yaml&lt;/code>)&lt;/li>
&lt;li>Flux v1 config (&lt;code>.flux.yaml&lt;/code>)&lt;/li>
&lt;/ul>
&lt;p>To define your own exclusion rules, see
&lt;a href="#excluding-files">excluding files&lt;/a>.&lt;/p>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>OCIRepository has various states during its lifecycle, reflected as
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">Kubernetes Conditions&lt;/a>.
It can be
&lt;a href="#reconciling-ocirepository">reconciling&lt;/a> while fetching the remote
state, it can be
&lt;a href="#ready-ocirepository">ready&lt;/a>, or it can
&lt;a href="#failed-ocirepository">fail during
reconciliation&lt;/a>.&lt;/p>
&lt;p>The OCIRepository API is compatible with the
&lt;a href="https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus" target="_blank">kstatus specification&lt;/a>,
and reports &lt;code>Reconciling&lt;/code> and &lt;code>Stalled&lt;/code> conditions where applicable to
provide better (timeout) support to solutions polling the OCIRepository to
become &lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-ocirepository">Reconciling OCIRepository&lt;/h4>
&lt;p>The source-controller marks an OCIRepository as &lt;em>reconciling&lt;/em> when one of the
following is true:&lt;/p>
&lt;ul>
&lt;li>There is no current Artifact for the OCIRepository, or the reported Artifact
is determined to have disappeared from the storage.&lt;/li>
&lt;li>The generation of the OCIRepository is newer than the
&lt;a href="#observed-generation">Observed
Generation&lt;/a>.&lt;/li>
&lt;li>The newly resolved Artifact digest differs from the current Artifact.&lt;/li>
&lt;/ul>
&lt;p>When the OCIRepository is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status becomes
&lt;code>Unknown&lt;/code> when the controller detects drift, and the controller adds a Condition
with the following attributes to the OCIRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code> | &lt;code>reason: ProgressingWithRetry&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the reconciling state is due to a new revision, an additional Condition is
added with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactOutdated&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: NewRevision&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Both Conditions have a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and are only present on the OCIRepository while their status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-ocirepository">Ready OCIRepository&lt;/h4>
&lt;p>The source-controller marks an OCIRepository as &lt;em>ready&lt;/em> when it has the
following characteristics:&lt;/p>
&lt;ul>
&lt;li>The OCIRepository reports an
&lt;a href="#artifact">Artifact&lt;/a>.&lt;/li>
&lt;li>The reported Artifact exists in the controller&amp;rsquo;s Artifact storage.&lt;/li>
&lt;li>The controller was able to communicate with the remote OCI repository using
the current spec.&lt;/li>
&lt;li>The digest of the reported Artifact is up-to-date with the latest
resolved digest of the remote OCI repository.&lt;/li>
&lt;/ul>
&lt;p>When the OCIRepository is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the
following attributes in the OCIRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the
OCIRepository is marked as
&lt;a href="#reconciling-ocirepository">reconciling&lt;/a>, or e.g. a
&lt;a href="#failed-ocirepository">transient error&lt;/a> occurs due to a temporary network issue.&lt;/p>
&lt;p>When the OCIRepository Artifact is archived in the controller&amp;rsquo;s Artifact
storage, the controller sets a Condition with the following attributes in the
OCIRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactInStorage&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>ArtifactInStorage&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until
the Artifact in the storage no longer exists.&lt;/p>
&lt;h4 id="failed-ocirepository">Failed OCIRepository&lt;/h4>
&lt;p>The source-controller may get stuck trying to produce an Artifact for a
OCIRepository without completing. This can occur due to some of the following
factors:&lt;/p>
&lt;ul>
&lt;li>The remote OCI repository
&lt;a href="#url">URL&lt;/a> is temporarily unavailable.&lt;/li>
&lt;li>The OCI repository does not exist.&lt;/li>
&lt;li>The
&lt;a href="#secret-reference">Secret reference&lt;/a> contains a reference to a
non-existing Secret.&lt;/li>
&lt;li>The credentials in the referenced Secret are invalid.&lt;/li>
&lt;li>The OCIRepository spec contains a generic misconfiguration.&lt;/li>
&lt;li>A storage related failure when storing the artifact.&lt;/li>
&lt;/ul>
&lt;p>When this happens, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
and adds a Condition with the following attributes to the OCIRepository&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: FetchFailed&lt;/code> | &lt;code>type: IncludeUnavailable&lt;/code> | &lt;code>type: StorageOperationFailed&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AuthenticationFailed&lt;/code> | &lt;code>reason: OCIArtifactPullFailed&lt;/code> | &lt;code>reason: OCIArtifactLayerOperationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This condition has a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and is only present on the OCIRepository while the status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.
There may be more arbitrary values for the &lt;code>reason&lt;/code> field to provide accurate
reason for a condition.&lt;/p>
&lt;p>In addition to the above Condition types, when the signature
&lt;a href="#verification">verification&lt;/a> fails. A condition with
the following attributes is added to the GitRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;False&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: VerificationError&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>While the OCIRepository has one or more of these Conditions, the controller
will continue to attempt to produce an Artifact for the resource with an
exponential backoff, until it succeeds and the OCIRepository is marked as
&lt;a href="#ready-ocirepository">ready&lt;/a>.&lt;/p>
&lt;p>Note that a OCIRepository can be
&lt;a href="#reconciling-ocirepository">reconciling&lt;/a>
while failing at the same time, for example due to a newly introduced
configuration issue in the OCIRepository spec. When a reconciliation fails, the
&lt;code>Reconciling&lt;/code> Condition reason would be &lt;code>ProgressingWithRetry&lt;/code>. When the
reconciliation is performed again after the failure, the reason is updated to
&lt;code>Progressing&lt;/code>.&lt;/p>
&lt;h3 id="observed-ignore">Observed Ignore&lt;/h3>
&lt;p>The source-controller reports an observed ignore in the OCIRepository&amp;rsquo;s
&lt;code>.status.observedIgnore&lt;/code>. The observed ignore is the latest &lt;code>.spec.ignore&lt;/code> value
which resulted in a
&lt;a href="#ready-ocirepository">ready state&lt;/a>, or stalled due to error
it can not recover from without human intervention. The value is the same as the
&lt;a href="#ignore">ignore in spec&lt;/a>. It indicates the ignore rules used in building the
current artifact in storage. It is also used by the controller to determine if
an artifact needs to be rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedIgnore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> hpa.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> build&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="observed-layer-selector">Observed Layer Selector&lt;/h3>
&lt;p>The source-controller reports an observed layer selector in the OCIRepository&amp;rsquo;s
&lt;code>.status.observedLayerSelector&lt;/code>. The observed layer selector is the latest
&lt;code>.spec.layerSelector&lt;/code> value which resulted in a
&lt;a href="#ready-ocirepository">ready state&lt;/a>,
or stalled due to error it can not recover from without human intervention.
The value is the same as the
&lt;a href="#layer-selector">layer selector in spec&lt;/a>.
It indicates the layer selection configuration used in building the current
artifact in storage. It is also used by the controller to determine if an
artifact needs to be rebuilt.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedLayerSelector&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">mediaType&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>application/vnd.cncf.helm.chart.content.v1.tar+gzip&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">operation&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>copy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The source-controller reports an
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">observed generation&lt;/a>
in the OCIRepository&amp;rsquo;s &lt;code>.status.observedGeneration&lt;/code>. The observed generation is
the latest &lt;code>.metadata.generation&lt;/code> which resulted in either a
&lt;a href="#ready-ocirepository">ready state&lt;/a>,
or stalled due to error it can not recover from without human
intervention.&lt;/p>
&lt;h3 id="last-handled-reconcile-at">Last Handled Reconcile At&lt;/h3>
&lt;p>The source-controller reports the last &lt;code>reconcile.fluxcd.io/requestedAt&lt;/code>
annotation value it acted on in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;p>For practical information about this field, see
&lt;a href="#triggering-a-reconcile">triggering a
reconcile&lt;/a>.&lt;/p></description></item><item><title>Flux: Buckets</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/buckets/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/buckets/</guid><description>
&lt;p>The &lt;code>Bucket&lt;/code> API defines a Source to produce an Artifact for objects from storage
solutions like Amazon S3, Google Cloud Storage buckets, or any other solution
with a S3 compatible API such as Minio, Alibaba Cloud OSS and others.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of a Bucket. It creates a tarball (&lt;code>.tar.gz&lt;/code>)
Artifact with the fetched objects from an object storage with an S3
compatible API (e.g.
&lt;a href="https://min.io" target="_blank">Minio&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>minio-bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>minio.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">insecure&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">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>minio-bucket-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">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>example&lt;span style="color:#bbb">
&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>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>minio-bucket-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">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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">accesskey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;access 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">secretkey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;secret key&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>A Bucket named &lt;code>minio-bucket&lt;/code> is created, indicated by the
&lt;code>.metadata.name&lt;/code> field.&lt;/li>
&lt;li>The source-controller checks the object storage bucket every five minutes,
indicated by the &lt;code>.spec.interval&lt;/code> field.&lt;/li>
&lt;li>It authenticates to the &lt;code>minio.example.com&lt;/code> endpoint with
the static credentials from the &lt;code>minio-secret&lt;/code> Secret data, indicated by
the &lt;code>.spec.endpoint&lt;/code> and &lt;code>.spec.secretRef.name&lt;/code> fields.&lt;/li>
&lt;li>A list of object keys and their
&lt;a href="https://en.wikipedia.org/wiki/HTTP_ETag" target="_blank">etags&lt;/a>
in the &lt;code>.spec.bucketName&lt;/code> bucket is compiled, while filtering the keys using
&lt;a href="#default-exclusions">default ignore rules&lt;/a>.&lt;/li>
&lt;li>The digest (algorithm defaults to SHA256) of the list is used as Artifact
revision, reported in-cluster in the &lt;code>.status.artifact.revision&lt;/code> field.&lt;/li>
&lt;li>When the current Bucket revision differs from the latest calculated revision,
all objects are fetched and archived.&lt;/li>
&lt;li>The new Artifact is reported in the &lt;code>.status.artifact&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>You can run this example by saving the manifest into &lt;code>bucket.yaml&lt;/code>, and
changing the Bucket and Secret values to target a Minio instance you have
control over.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> For more advanced examples targeting e.g. Amazon S3 or GCP, see
&lt;a href="#provider">Provider&lt;/a>.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f bucket.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get buckets&lt;/code> to see the Bucket:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME ENDPOINT AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">minio-bucket minio.example.com 34s True stored artifact for revision &amp;#39;sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl describe bucket minio-bucket&lt;/code> to see the
&lt;a href="#artifact">Artifact&lt;/a>
and
&lt;a href="#conditions">Conditions&lt;/a> in the Bucket&amp;rsquo;s 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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Artifact:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Digest: sha256:72aa638abb455ca5f9ef4825b949fd2de4d4be0a74895bf7ed2338622cd12686
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Update Time: 2024-02-01T23:43:38Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Path: bucket/default/minio-bucket/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Revision: sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Size: 38099
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./bucket/default/minio-bucket/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-02-01T23:43:38Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-02-01T23:43:38Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: ArtifactInStorage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./bucket/default/minio-bucket/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal NewArtifact 82s source-controller stored artifact with 16 fetched files from &amp;#39;example&amp;#39; bucket
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="writing-a-bucket-spec">Writing a Bucket spec&lt;/h2>
&lt;p>As with all other Kubernetes config, a Bucket needs &lt;code>apiVersion&lt;/code>, &lt;code>kind&lt;/code>, and
&lt;code>metadata&lt;/code> fields. The name of a Bucket object must be a valid
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names#dns-subdomain-names" target="_blank">DNS subdomain name&lt;/a>.&lt;/p>
&lt;p>A Bucket also needs a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" target="_blank">&lt;code>.spec&lt;/code> section&lt;/a>.&lt;/p>
&lt;h3 id="provider">Provider&lt;/h3>
&lt;p>The &lt;code>.spec.provider&lt;/code> field allows for specifying a Provider to enable provider
specific configurations, for example to communicate with a non-S3 compatible
API endpoint, or to change the authentication method.&lt;/p>
&lt;p>Supported options are:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="#generic">Generic&lt;/a>&lt;/li>
&lt;li>
&lt;a href="#aws">AWS&lt;/a>&lt;/li>
&lt;li>
&lt;a href="#azure">Azure&lt;/a>&lt;/li>
&lt;li>
&lt;a href="#gcp">GCP&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>If you do not specify &lt;code>.spec.provider&lt;/code>, it defaults to &lt;code>generic&lt;/code>.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h4 id="generic">Generic&lt;/h4>
&lt;p>When a Bucket&amp;rsquo;s &lt;code>spec.provider&lt;/code> is set to &lt;code>generic&lt;/code>, the controller will
attempt to communicate with the specified
&lt;a href="#endpoint">Endpoint&lt;/a> using the
&lt;a href="https://github.com/minio/minio-go" target="_blank">Minio Client SDK&lt;/a>, which can communicate
with any Amazon S3 compatible object storage (including
&lt;a href="https://cloud.google.com/storage/docs/interoperability" target="_blank">GCS&lt;/a>,
&lt;a href="https://wasabi-support.zendesk.com/hc/en-us/articles/360002079671-How-do-I-use-Minio-Client-with-Wasabi-" target="_blank">Wasabi&lt;/a>,
and many others).&lt;/p>
&lt;p>The &lt;code>generic&lt;/code> Provider &lt;em>requires&lt;/em> a
&lt;a href="#secret-reference">Secret reference&lt;/a> to a
Secret with &lt;code>.data.accesskey&lt;/code> and &lt;code>.data.secretkey&lt;/code> values, used to
authenticate with static credentials.&lt;/p>
&lt;p>The Provider allows for specifying a region the bucket is in using the
&lt;a href="#region">&lt;code>.spec.region&lt;/code> field&lt;/a>, if required by the
&lt;a href="#endpoint">Endpoint&lt;/a>.&lt;/p>
&lt;h5 id="generic-example">Generic example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>generic-insecure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>generic&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>minio.minio.svc.cluster.local:9000&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>60s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">insecure&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">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>minio-credentials&lt;span style="color:#bbb">
&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>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>minio-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">accesskey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">secretkey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="aws">AWS&lt;/h4>
&lt;p>When a Bucket&amp;rsquo;s &lt;code>.spec.provider&lt;/code> field is set to &lt;code>aws&lt;/code>, the source-controller
will attempt to communicate with the specified
&lt;a href="#endpoint">Endpoint&lt;/a> using the
&lt;a href="https://github.com/minio/minio-go" target="_blank">Minio Client SDK&lt;/a>.&lt;/p>
&lt;p>Without a
&lt;a href="#secret-reference">Secret reference&lt;/a>, authorization using
credentials retrieved from the AWS EC2 service is attempted by default. When
a reference is specified, it expects a Secret with &lt;code>.data.accesskey&lt;/code> and
&lt;code>.data.secretkey&lt;/code> values, used to authenticate with static credentials.&lt;/p>
&lt;p>The Provider allows for specifying the
&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions" target="_blank">Amazon AWS Region&lt;/a>
using the
&lt;a href="#region">&lt;code>.spec.region&lt;/code> field&lt;/a>.&lt;/p>
&lt;p>For detailed setup instructions, see:
&lt;a href="https://fluxcd.io/flux/integrations/aws/#for-amazon-simple-storage-service" target="_blank">https://fluxcd.io/flux/integrations/aws/#for-amazon-simple-storage-service&lt;/a>&lt;/p>
&lt;h5 id="aws-ec2-example">AWS EC2 example&lt;/h5>
&lt;p>&lt;strong>Note:&lt;/strong> On EKS you have to create an
&lt;a href="#aws-iam-role-example">IAM role&lt;/a> for
the source-controller service account that grants access to the bucket.&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>s3.amazonaws.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="aws-iam-role-example">AWS IAM role example&lt;/h5>
&lt;p>Replace &lt;code>&amp;lt;bucket-name&amp;gt;&lt;/code> with the specified &lt;code>.spec.bucketName&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-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Version&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;2012-10-17&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Statement&amp;#34;&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:#062873;font-weight:bold">&amp;#34;Sid&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Effect&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Allow&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Action&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;s3:GetObject&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Resource&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;arn:aws:s3:::&amp;lt;bucket-name&amp;gt;/*&amp;#34;&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>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Sid&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Effect&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;Allow&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Action&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;s3:ListBucket&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;Resource&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;arn:aws:s3:::&amp;lt;bucket-name&amp;gt;&amp;#34;&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>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="aws-static-auth-example">AWS static auth example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>s3.amazonaws.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws-credentials&lt;span style="color:#bbb">
&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>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>aws-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">accesskey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">secretkey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="aws-controller-level-workload-identity-example">AWS Controller-Level Workload Identity example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws-controller-level-workload-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>s3.amazonaws.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="aws-object-level-workload-identity-example">AWS Object-Level Workload Identity example&lt;/h5>
&lt;p>&lt;strong>Note:&lt;/strong> To use Object-Level Workload Identity (&lt;code>.spec.serviceAccountName&lt;/code> with
cloud providers), the controller feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must
be enabled.&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws-object-level-workload-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>aws&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>s3.amazonaws.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>aws-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&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>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>aws-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">eks.amazonaws.com/role-arn&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>arn:aws:iam::123456789012:role/flux-bucket-role&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="azure">Azure&lt;/h4>
&lt;p>When a Bucket&amp;rsquo;s &lt;code>.spec.provider&lt;/code> is set to &lt;code>azure&lt;/code>, the source-controller will
attempt to communicate with the specified
&lt;a href="#endpoint">Endpoint&lt;/a> using the
&lt;a href="https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob" target="_blank">Azure Blob Storage SDK for Go&lt;/a>.&lt;/p>
&lt;p>Without a
&lt;a href="#secret-reference">Secret reference&lt;/a>, authentication using a chain
with:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#EnvironmentCredential" target="_blank">Environment credentials&lt;/a>&lt;/li>
&lt;li>
&lt;a href="https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#WorkloadIdentityCredential" target="_blank">Workload Identity&lt;/a>&lt;/li>
&lt;li>
&lt;a href="https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ManagedIdentityCredential" target="_blank">Managed Identity&lt;/a>
with the &lt;code>AZURE_CLIENT_ID&lt;/code>&lt;/li>
&lt;li>Managed Identity with a system-assigned identity&lt;/li>
&lt;/ul>
&lt;p>is attempted by default. If no chain can be established, the bucket
is assumed to be publicly reachable.&lt;/p>
&lt;p>When a reference is specified, it expects a Secret with one of the following
sets of &lt;code>.data&lt;/code> fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tenantId&lt;/code>, &lt;code>clientId&lt;/code> and &lt;code>clientSecret&lt;/code> for authenticating a Service
Principal with a secret.&lt;/li>
&lt;li>&lt;code>tenantId&lt;/code>, &lt;code>clientId&lt;/code> and &lt;code>clientCertificate&lt;/code> (plus optionally
&lt;code>clientCertificatePassword&lt;/code> and/or &lt;code>clientCertificateSendChain&lt;/code>) for
authenticating a Service Principal with a certificate.&lt;/li>
&lt;li>&lt;code>clientId&lt;/code> for authenticating using a Managed Identity.&lt;/li>
&lt;li>&lt;code>accountKey&lt;/code> for authenticating using a
&lt;a href="https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#SharedKeyCredential" target="_blank">Shared Key&lt;/a>.&lt;/li>
&lt;li>&lt;code>sasKey&lt;/code> for authenticating using a
&lt;a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview" target="_blank">SAS Token&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>For any Managed Identity and/or Microsoft Entra ID (Formerly Azure Active Directory) authentication method,
the base URL can be configured using &lt;code>.data.authorityHost&lt;/code>. If not supplied,
&lt;a href="https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#AuthorityHost" target="_blank">&lt;code>AzurePublicCloud&lt;/code> is assumed&lt;/a>.&lt;/p>
&lt;h5 id="azure-example">Azure example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-public&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://podinfoaccount.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-service-principal-secret-example">Azure Service Principal Secret example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-service-principal-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">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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://&amp;lt;account-name&amp;gt;.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-sp-auth&lt;span style="color:#bbb">
&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>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>azure-sp-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">tenantId&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">clientId&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">clientSecret&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-service-principal-certificate-example">Azure Service Principal Certificate example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-service-principal-cert&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://&amp;lt;account-name&amp;gt;.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-sp-auth&lt;span style="color:#bbb">
&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>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>azure-sp-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">tenantId&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">clientId&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">clientCertificate&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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"># Plus optionally&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">clientCertificatePassword&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">clientCertificateSendChain&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># either &amp;#34;1&amp;#34; or &amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-managed-identity-with-client-id-example">Azure Managed Identity with Client ID example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-managed-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://&amp;lt;account-name&amp;gt;.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-smi-auth&lt;span style="color:#bbb">
&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>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>azure-smi-auth&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">clientId&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-blob-shared-key-example">Azure Blob Shared Key example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-shared-key&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://&amp;lt;account-name&amp;gt;.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-key&lt;span style="color:#bbb">
&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>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>azure-key&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">accountKey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="workload-identity">Workload Identity&lt;/h5>
&lt;p>If you have
&lt;a href="https://azure.github.io/azure-workload-identity/docs/installation/managed-clusters.html" target="_blank">Workload Identity&lt;/a>
set up on your cluster, you need to create an Azure Identity and give it
access to Azure Blob Storage.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020">export&lt;/span> &lt;span style="color:#bb60d5">IDENTITY_NAME&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;blob-access&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>az role assignment create --role &lt;span style="color:#4070a0">&amp;#34;Storage Blob Data Reader&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>--assignee-object-id &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>az identity show -n &lt;span style="color:#bb60d5">$IDENTITY_NAME&lt;/span> -o tsv --query principalId -g &lt;span style="color:#bb60d5">$RESOURCE_GROUP&lt;/span>&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&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>--scope &lt;span style="color:#4070a0">&amp;#34;/subscriptions/&amp;lt;SUBSCRIPTION-ID&amp;gt;/resourceGroups/&amp;lt;RESOURCE_GROUP&amp;gt;/providers/Microsoft.Storage/storageAccounts/&amp;lt;account-name&amp;gt;/blobServices/default/containers/&amp;lt;container-name&amp;gt;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Establish a federated identity between the Identity and the source-controller
ServiceAccount.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020">export&lt;/span> &lt;span style="color:#bb60d5">SERVICE_ACCOUNT_ISSUER&lt;/span>&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>az aks show --resource-group &amp;lt;RESOURCE_GROUP&amp;gt; --name &amp;lt;CLUSTER-NAME&amp;gt; --query &lt;span style="color:#4070a0">&amp;#34;oidcIssuerProfile.issuerUrl&amp;#34;&lt;/span> -otsv&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>az identity federated-credential create &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> --name &lt;span style="color:#4070a0">&amp;#34;kubernetes-federated-credential&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> --identity-name &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#70a0d0">${&lt;/span>&lt;span style="color:#bb60d5">IDENTITY_NAME&lt;/span>&lt;span style="color:#70a0d0">}&lt;/span>&lt;span style="color:#4070a0">&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> --resource-group &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#70a0d0">${&lt;/span>&lt;span style="color:#bb60d5">RESOURCE_GROUP&lt;/span>&lt;span style="color:#70a0d0">}&lt;/span>&lt;span style="color:#4070a0">&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> --issuer &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#70a0d0">${&lt;/span>&lt;span style="color:#bb60d5">SERVICE_ACCOUNT_ISSUER&lt;/span>&lt;span style="color:#70a0d0">}&lt;/span>&lt;span style="color:#4070a0">&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> --subject &lt;span style="color:#4070a0">&amp;#34;system:serviceaccount:flux-system:source-controller&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Add a patch to label and annotate the source-controller Deployment and ServiceAccount
correctly so that it can match an identity binding:&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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/client-id: &amp;lt;AZURE_CLIENT_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &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">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: apps/v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: Deployment
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> spec:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> template:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you have set up Workload Identity correctly and labeled the source-controller
Deployment and ServiceAccount, then you don&amp;rsquo;t need to reference a Secret. For more information,
please see
&lt;a href="https://azure.github.io/azure-workload-identity/docs/quick-start.html" target="_blank">documentation&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:#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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>testwi&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://testfluxwi.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-object-level-workload-identity-example">Azure Object-Level Workload Identity example&lt;/h5>
&lt;p>&lt;strong>Note:&lt;/strong> To use Object-Level Workload Identity (&lt;code>.spec.serviceAccountName&lt;/code> with
cloud providers), the controller feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must
be enabled.&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-object-level-workload-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>testwi&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://testfluxwi.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&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>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>azure-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">azure.workload.identity/client-id&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;AZURE_CLIENT_ID&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">azure.workload.identity/tenant-id&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;AZURE_TENANT_ID&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="azure-blob-sas-token-example">Azure Blob SAS Token example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-sas-token&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>azure&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://&amp;lt;account-name&amp;gt;.blob.core.windows.net&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>azure-key&lt;span style="color:#bbb">
&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>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>azure-key&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">sasKey&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;base64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>sasKey&lt;/code> only contains the SAS token e.g
&lt;code>?sv=2020-08-0&amp;amp;ss=bfqt&amp;amp;srt=co&amp;amp;sp=rwdlacupitfx&amp;amp;se=2022-05-26T21:55:35Z&amp;amp;st=2022-05...&lt;/code>.
The leading question mark (&lt;code>?&lt;/code>) is optional. The query values from the &lt;code>sasKey&lt;/code>
data field in the Secrets gets merged with the ones in the &lt;code>.spec.endpoint&lt;/code> of
the Bucket. If the same key is present in the both of them, the value in the
&lt;code>sasKey&lt;/code> takes precedence.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The SAS token has an expiry date, and it must be updated before it
expires to allow Flux to continue to access Azure Storage. It is allowed to use
an account-level or container-level SAS token.&lt;/p>
&lt;p>The minimum permissions for an account-level SAS token are:&lt;/p>
&lt;ul>
&lt;li>Allowed services: &lt;code>Blob&lt;/code>&lt;/li>
&lt;li>Allowed resource types: &lt;code>Container&lt;/code>, &lt;code>Object&lt;/code>&lt;/li>
&lt;li>Allowed permissions: &lt;code>Read&lt;/code>, &lt;code>List&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The minimum permissions for a container-level SAS token are:&lt;/p>
&lt;ul>
&lt;li>Allowed permissions: &lt;code>Read&lt;/code>, &lt;code>List&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Refer to the
&lt;a href="https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas#blob-service" target="_blank">Azure documentation&lt;/a> for a full overview on permissions.&lt;/p>
&lt;h4 id="gcp">GCP&lt;/h4>
&lt;p>For detailed setup instructions, see:
&lt;a href="https://fluxcd.io/flux/integrations/gcp/#for-google-cloud-storage" target="_blank">https://fluxcd.io/flux/integrations/gcp/#for-google-cloud-storage&lt;/a>&lt;/p>
&lt;h5 id="gcp-controller-level-workload-identity-example">GCP Controller-Level Workload Identity example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>gcp-controller-level-workload-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gcp&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>storage.googleapis.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="gcp-object-level-workload-identity-example">GCP Object-Level Workload Identity example&lt;/h5>
&lt;p>&lt;strong>Note:&lt;/strong> To use Object-Level Workload Identity (&lt;code>.spec.serviceAccountName&lt;/code> with
cloud providers), the controller feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must
be enabled.&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>gcp-object-level-workload-identity&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gcp&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>storage.googleapis.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>us-east-1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>gcp-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30s&lt;span style="color:#bbb">
&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>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>gcp-workload-identity-sa&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">iam.gke.io/gcp-service-account&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;identity-name&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="gcp-static-auth-example">GCP static auth example&lt;/h5>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>gcp-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">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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>gcp&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-name&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">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>storage.googleapis.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">region&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;bucket-region&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">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>gcp-service-account&lt;span style="color:#bbb">
&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>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>gcp-service-account&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">serviceaccount&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Where the (base64 decoded) value of &lt;code>.data.serviceaccount&lt;/code> looks 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-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;service_account&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;project_id&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;private_key_id&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;28qwgh3gdf5hj3gb5fj3gsu5yfgh34f45324568hy2&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;private_key&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;-----BEGIN PRIVATE KEY-----\nHwethgy123hugghhhbdcu6356dgyjhsvgvGFDHYgcdjbvcdhbsx63c\n76tgycfehuhVGTFYfw6t7ydgyVgydheyhuggycuhejwy6t35fthyuhegvcetf\nTFUHGTygghubhxe65ygt6tgyedgy326hucyvsuhbhcvcsjhcsjhcsvgdtHFCGi\nHcye6tyyg3gfyuhchcsbhygcijdbhyyTF66tuhcevuhdcbhuhhvftcuhbh3uh7t6y\nggvftUHbh6t5rfthhuGVRtfjhbfcrd5r67yuhuvgFTYjgvtfyghbfcdrhyjhbfctfdfyhvfg\ntgvggtfyghvft6tugvTF5r66tujhgvfrtyhhgfct6y7ytfr5ctvghbhhvtghhjvcttfycf\nffxfghjbvgcgyt67ujbgvctfyhVC7uhvgcyjvhhjvyujc\ncgghgvgcfhgg765454tcfthhgftyhhvvyvvffgfryyu77reredswfthhgfcftycfdrttfhf/\n-----END PRIVATE KEY-----\n&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;client_email&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;test@example.iam.gserviceaccount.com&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;client_id&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;32657634678762536746&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;auth_uri&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;https://accounts.google.com/o/oauth2/auth&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;token_uri&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;https://oauth2.googleapis.com/token&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;auth_provider_x509_cert_url&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;https://www.googleapis.com/oauth2/v1/certs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#062873;font-weight:bold">&amp;#34;client_x509_cert_url&amp;#34;&lt;/span>: &lt;span style="color:#4070a0">&amp;#34;https://www.googleapis.com/robot/v1/metadata/x509/test%40podinfo.iam.gserviceaccount.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="interval">Interval&lt;/h3>
&lt;p>&lt;code>.spec.interval&lt;/code> is a required field that specifies the interval which the
object storage bucket must be consulted at.&lt;/p>
&lt;p>After successfully reconciling a Bucket object, the source-controller requeues
the object for inspection after the specified interval. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>10m0s&lt;/code> to look at the object storage bucket every 10 minutes.&lt;/p>
&lt;p>If the &lt;code>.metadata.generation&lt;/code> of a resource changes (due to e.g. the apply of a
change to the spec), this is handled instantly outside the interval window.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple Bucket objects are set up
with the same interval. For more information, please refer to the
&lt;a href="https://fluxcd.io/flux/components/source/options/" target="_blank">source-controller configuration options&lt;/a>.&lt;/p>
&lt;h3 id="endpoint">Endpoint&lt;/h3>
&lt;p>&lt;code>.spec.endpoint&lt;/code> is a required field that specifies the HTTP/S object storage
endpoint to connect to and fetch objects from. Connecting to an (insecure)
HTTP endpoint requires enabling
&lt;a href="#insecure">&lt;code>.spec.insecure&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Some endpoints require the specification of a
&lt;a href="#region">&lt;code>.spec.region&lt;/code>&lt;/a>,
see
&lt;a href="#provider">Provider&lt;/a> for more (provider specific) examples.&lt;/p>
&lt;h3 id="sts">STS&lt;/h3>
&lt;p>&lt;code>.spec.sts&lt;/code> is an optional field for specifying the Security Token Service
configuration. A Security Token Service (STS) is a web service that issues
temporary security credentials. By adding this field, one may specify the
STS endpoint from where temporary credentials will be fetched.&lt;/p>
&lt;p>This field is only supported for the &lt;code>aws&lt;/code> and &lt;code>generic&lt;/code> bucket
&lt;a href="#provider">providers&lt;/a>.&lt;/p>
&lt;p>If using &lt;code>.spec.sts&lt;/code>, the following fields are required:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.spec.sts.provider&lt;/code>, the Security Token Service provider. The only supported
option for the &lt;code>generic&lt;/code> bucket provider is &lt;code>ldap&lt;/code>. The only supported option
for the &lt;code>aws&lt;/code> bucket provider is &lt;code>aws&lt;/code>.&lt;/li>
&lt;li>&lt;code>.spec.sts.endpoint&lt;/code>, the HTTP/S endpoint of the Security Token Service. In
the case of &lt;code>aws&lt;/code> this can be &lt;code>https://sts.amazonaws.com&lt;/code>, or a Regional STS
Endpoint, or an Interface Endpoint created inside a VPC. In the case of
&lt;code>ldap&lt;/code> this must be the LDAP server endpoint.&lt;/li>
&lt;/ul>
&lt;p>When using the &lt;code>ldap&lt;/code> provider, the following fields may also be specified:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.spec.sts.secretRef.name&lt;/code>, the name of the Secret containing the LDAP
credentials. The Secret must contain the following keys:
&lt;ul>
&lt;li>&lt;code>username&lt;/code>, the username to authenticate with.&lt;/li>
&lt;li>&lt;code>password&lt;/code>, the password to authenticate with.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;code>.spec.sts.certSecretRef.name&lt;/code>, the name of the Secret containing the
TLS configuration for communicating with the STS endpoint. The contents
of this Secret must follow the same structure of
&lt;a href="#cert-secret-reference">&lt;code>.spec.certSecretRef.name&lt;/code>&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>If
&lt;a href="#proxy-secret-reference">&lt;code>.spec.proxySecretRef.name&lt;/code>&lt;/a> is specified,
the proxy configuration will be used for commucating with the STS endpoint.&lt;/p>
&lt;p>Example for the &lt;code>ldap&lt;/code> provider:&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>generic&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>minio.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">sts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ldap&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>https://ldap.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">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>ldap-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">certSecretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ldap-tls&lt;span style="color:#bbb">
&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>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>ldap-credentials&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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;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;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:#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>ldap-tls&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kubernetes.io/tls&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># or Opaque&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">tls.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-encoded cert&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">tls.key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-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">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-encoded cert&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="bucket-name">Bucket name&lt;/h3>
&lt;p>&lt;code>.spec.bucketName&lt;/code> is a required field that specifies which object storage
bucket on the
&lt;a href="#endpoint">Endpoint&lt;/a> objects should be fetched from.&lt;/p>
&lt;p>See
&lt;a href="#provider">Provider&lt;/a> for more (provider specific) examples.&lt;/p>
&lt;h3 id="region">Region&lt;/h3>
&lt;p>&lt;code>.spec.region&lt;/code> is an optional field to specify the region a
&lt;a href="#bucket-name">&lt;code>.spec.bucketName&lt;/code>&lt;/a> is located in.&lt;/p>
&lt;p>See
&lt;a href="#provider">Provider&lt;/a> for more (provider specific) examples.&lt;/p>
&lt;h3 id="mutual-tls-authentication">Mutual TLS Authentication&lt;/h3>
&lt;p>&lt;code>.spec.certSecretRef.name&lt;/code> is an optional field to specify a secret containing
TLS certificate data for mutual TLS authentication.&lt;/p>
&lt;p>To authenticate towards a bucket using mutual TLS,
the referenced Secret&amp;rsquo;s &lt;code>.data&lt;/code> should contain the following keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tls.crt&lt;/code> and &lt;code>tls.key&lt;/code>, to specify the client certificate and private key used
for TLS client authentication. These must be used in conjunction, i.e.
specifying one without the other will lead to an error.&lt;/li>
&lt;li>&lt;code>ca.crt&lt;/code>, to specify the CA certificate used to verify the server, which is
required if the server is using a self-signed certificate.&lt;/li>
&lt;/ul>
&lt;p>The Secret should be of type &lt;code>Opaque&lt;/code> or &lt;code>kubernetes.io/tls&lt;/code>. All the files in
the Secret are expected to be [PEM-encoded][pem-encoding]. Assuming you have
three files; &lt;code>client.key&lt;/code>, &lt;code>client.crt&lt;/code> and &lt;code>ca.crt&lt;/code> for the client private key,
client certificate and the CA certificate respectively, you can generate the
required Secret using the &lt;code>flux create secret tls&lt;/code> command:&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 secret tls minio-tls --tls-key-file&lt;span style="color:#666">=&lt;/span>client.key --tls-crt-file&lt;span style="color:#666">=&lt;/span>client.crt --ca-crt-file&lt;span style="color:#666">=&lt;/span>ca.crt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If TLS client authentication is not required, you can generate the secret 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 create secret tls minio-tls --ca-crt-file&lt;span style="color:#666">=&lt;/span>ca.crt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This API is only supported for the &lt;code>generic&lt;/code>
&lt;a href="#provider">provider&lt;/a>.&lt;/p>
&lt;p>Example usage:&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">bucketName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>generic&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">endpoint&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>minio.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">certSecretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>minio-tls&lt;span style="color:#bbb">
&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>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>minio-tls&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kubernetes.io/tls&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># or Opaque&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">tls.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-encoded cert&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">tls.key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-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">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;PEM-encoded cert&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="proxy-secret-reference">Proxy secret reference&lt;/h3>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> is an optional field used to specify the name of a
Secret that contains the proxy settings for the object. These settings are used
for all the remote operations related to the Bucket.
The Secret can contain three keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>address&lt;/code>, to specify the address of the proxy server. This is a required key.&lt;/li>
&lt;li>&lt;code>username&lt;/code>, to specify the username to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;li>&lt;code>password&lt;/code>, to specify the password to use if the proxy server is protected by
basic authentication. This is an optional key.&lt;/li>
&lt;/ul>
&lt;p>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:#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>http-proxy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">address&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>http://proxy.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">username&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>mandalorian&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>grogu&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Proxying can also be configured in the source-controller Deployment directly by
using the standard environment variables such as &lt;code>HTTPS_PROXY&lt;/code>, &lt;code>ALL_PROXY&lt;/code>, etc.&lt;/p>
&lt;p>&lt;code>.spec.proxySecretRef.name&lt;/code> takes precedence over all environment variables.&lt;/p>
&lt;h3 id="insecure">Insecure&lt;/h3>
&lt;p>&lt;code>.spec.insecure&lt;/code> is an optional field to allow connecting to an insecure (HTTP)
&lt;a href="#endpoint">endpoint&lt;/a>, if set to &lt;code>true&lt;/code>. The default value is &lt;code>false&lt;/code>,
denying insecure (HTTP) connections.&lt;/p>
&lt;h3 id="timeout">Timeout&lt;/h3>
&lt;p>&lt;code>.spec.timeout&lt;/code> is an optional field to specify a timeout for object storage
fetch operations. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>1m30s&lt;/code> for a timeout of one minute and thirty seconds.
The default value is &lt;code>60s&lt;/code>.&lt;/p>
&lt;h3 id="secret-reference">Secret reference&lt;/h3>
&lt;p>&lt;code>.spec.secretRef.name&lt;/code> is an optional field to specify a name reference to a
Secret in the same namespace as the Bucket, containing authentication
credentials for the object storage. For some &lt;code>.spec.provider&lt;/code> implementations
the presence of the field is required, see
&lt;a href="#provider">Provider&lt;/a> for more
details and examples.&lt;/p>
&lt;h3 id="service-account-reference">Service Account reference&lt;/h3>
&lt;p>&lt;code>.spec.serviceAccountName&lt;/code> is an optional field to specify a Service Account
in the same namespace as Bucket with purpose depending on the value of
the &lt;code>.spec.provider&lt;/code> field:&lt;/p>
&lt;ul>
&lt;li>When &lt;code>.spec.provider&lt;/code> is set to &lt;code>generic&lt;/code>, the controller will fetch the image
pull secrets attached to the Service Account and use them for authentication.&lt;/li>
&lt;li>When &lt;code>.spec.provider&lt;/code> is set to &lt;code>aws&lt;/code>, &lt;code>azure&lt;/code>, or &lt;code>gcp&lt;/code>, the Service Account
will be used for Workload Identity authentication. In this case, the controller
feature gate &lt;code>ObjectLevelWorkloadIdentity&lt;/code> must be enabled, otherwise the
controller will error out.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Note:&lt;/strong> that for a publicly accessible object storage, you don&amp;rsquo;t need to
provide a &lt;code>secretRef&lt;/code> nor &lt;code>serviceAccountName&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Important:&lt;/strong> &lt;code>.spec.secretRef&lt;/code> and &lt;code>.spec.serviceAccountName&lt;/code> are mutually
exclusive and cannot be set at the same time. This constraint is enforced
at the CRD level.&lt;/p>
&lt;p>For a complete guide on how to set up authentication for cloud providers,
see the integration
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;h3 id="prefix">Prefix&lt;/h3>
&lt;p>&lt;code>.spec.prefix&lt;/code> is an optional field to enable server-side filtering
of files in the Bucket.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The server-side filtering works only with the &lt;code>generic&lt;/code>, &lt;code>aws&lt;/code>
and &lt;code>gcp&lt;/code>
&lt;a href="#provider">provider&lt;/a> and is preferred over
&lt;a href="#ignore">&lt;code>.spec.ignore&lt;/code>&lt;/a>
as a more efficient way of excluding files.&lt;/p>
&lt;h3 id="ignore">Ignore&lt;/h3>
&lt;p>&lt;code>.spec.ignore&lt;/code> is an optional field to specify rules in
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code>
pattern format&lt;/a>. Storage
objects which keys match the defined rules are excluded while fetching.&lt;/p>
&lt;p>When specified, &lt;code>.spec.ignore&lt;/code> overrides the
&lt;a href="#default-exclusions">default exclusion
list&lt;/a>, and may overrule the
&lt;a href="#sourceignore-file">&lt;code>.sourceignore&lt;/code> file
exclusions&lt;/a>. See
&lt;a href="#excluding-files">excluding files&lt;/a>
for more information.&lt;/p>
&lt;h3 id="suspend">Suspend&lt;/h3>
&lt;p>&lt;code>.spec.suspend&lt;/code> is an optional field to suspend the reconciliation of a Bucket.
When set to &lt;code>true&lt;/code>, the controller will stop reconciling the Bucket, and changes
to the resource or in the object storage bucket will not result in a new
Artifact. When the field is set to &lt;code>false&lt;/code> or removed, it will resume.&lt;/p>
&lt;p>For practical information, see
&lt;a href="#suspending-and-resuming">suspending and resuming&lt;/a>.&lt;/p>
&lt;h2 id="working-with-buckets">Working with Buckets&lt;/h2>
&lt;h3 id="excluding-files">Excluding files&lt;/h3>
&lt;p>By default, storage bucket objects which match the
&lt;a href="#default-exclusions">default exclusion
rules&lt;/a> are excluded while fetching. It is possible to
overwrite and/or overrule the default exclusions using a file in the bucket
and/or an in-spec set of rules.&lt;/p>
&lt;h4 id="sourceignore-file">&lt;code>.sourceignore&lt;/code> file&lt;/h4>
&lt;p>Excluding files is possible by adding a &lt;code>.sourceignore&lt;/code> file in the root of the
object storage bucket. The &lt;code>.sourceignore&lt;/code> file follows
&lt;a href="https://git-scm.com/docs/gitignore#_pattern_format" target="_blank">the &lt;code>.gitignore&lt;/code>
pattern format&lt;/a>, and
pattern entries may overrule
&lt;a href="#default-exclusions">default exclusions&lt;/a>.&lt;/p>
&lt;h4 id="ignore-spec">Ignore spec&lt;/h4>
&lt;p>Another option is to define the exclusions within the Bucket spec, using the
&lt;a href="#ignore">&lt;code>.spec.ignore&lt;/code> field&lt;/a>. Specified rules override the
&lt;a href="#default-exclusions">default exclusion list&lt;/a>, and may overrule &lt;code>.sourceignore&lt;/code>
file exclusions.&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;bucket-name&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">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">ignore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> # exclude all
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&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"> # include deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> !/deploy
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> # exclude file extensions from deploy dir
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.md
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> /deploy/**/*.txt&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="triggering-a-reconcile">Triggering a reconcile&lt;/h3>
&lt;p>To manually tell the source-controller to reconcile a Bucket outside the
&lt;a href="#interval">specified interval window&lt;/a>, a Bucket can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the Bucket for reconciliation if the &lt;code>&amp;lt;arbitrary-value&amp;gt;&lt;/code> differs from
the last value the controller acted on, as reported in
&lt;a href="#last-handled-reconcile-at">&lt;code>.status.lastHandledReconcileAt&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 annotate --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply --overwrite bucket/&amp;lt;bucket-name&amp;gt; reconcile.fluxcd.io/requestedAt&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>date +%s&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux reconcile &lt;span style="color:#007020">source&lt;/span> bucket &amp;lt;bucket-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="waiting-for-ready">Waiting for &lt;code>Ready&lt;/code>&lt;/h3>
&lt;p>When a change is applied, it is possible to wait for the Bucket to reach a
&lt;a href="#ready-bucket">ready state&lt;/a> using &lt;code>kubectl&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 &lt;span style="color:#007020">wait&lt;/span> bucket/&amp;lt;bucket-name&amp;gt; --for&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">condition&lt;/span>&lt;span style="color:#666">=&lt;/span>ready --timeout&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspending-and-resuming">Suspending and resuming&lt;/h3>
&lt;p>When you find yourself in a situation where you temporarily want to pause the
reconciliation of a Bucket, you can suspend it using the
&lt;a href="#suspend">&lt;code>.spec.suspend&lt;/code>
field&lt;/a>.&lt;/p>
&lt;h4 id="suspend-a-bucket">Suspend a Bucket&lt;/h4>
&lt;p>In your YAML declaration:&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;bucket-name&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">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">suspend&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>Using &lt;code>kubectl&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 patch bucket &amp;lt;bucket-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34;: {\&amp;#34;suspend\&amp;#34; : true }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux &lt;span style="color:#007020">suspend&lt;/span> &lt;span style="color:#007020">source&lt;/span> bucket &amp;lt;bucket-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When a Bucket has an Artifact and is suspended, and this Artifact
later disappears from the storage due to e.g. the source-controller Pod being
evicted from a Node, this will not be reflected in the Bucket&amp;rsquo;s Status until it
is resumed.&lt;/p>
&lt;h4 id="resume-a-bucket">Resume a Bucket&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the field:&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;bucket-name&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">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"># suspend: true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> Setting the field value to &lt;code>false&lt;/code> has the same effect as removing
it, but does not allow for &amp;ldquo;hot patching&amp;rdquo; using e.g. &lt;code>kubectl&lt;/code> while practicing
GitOps; as the manually applied patch would be overwritten by the declared
state in Git.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 patch bucket &amp;lt;bucket-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34; : {\&amp;#34;suspend\&amp;#34; : false }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux resume &lt;span style="color:#007020">source&lt;/span> bucket &amp;lt;bucket-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-a-bucket">Debugging a Bucket&lt;/h3>
&lt;p>There are several ways to gather information about a Bucket for debugging
purposes.&lt;/p>
&lt;h4 id="describe-the-bucket">Describe the Bucket&lt;/h4>
&lt;p>Describing a Bucket using &lt;code>kubectl describe bucket &amp;lt;bucket-name&amp;gt;&lt;/code> displays the
latest recorded information for the resource in the &lt;code>Status&lt;/code> and &lt;code>Events&lt;/code>
sections:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-02-02T13:26:55Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: processing object: new generation 1 -&amp;gt; 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: ProgressingWithRetry
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Reconciling
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-02-02T13:26:55Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: bucket &amp;#39;my-new-bucket&amp;#39; does not exist
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: BucketOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: False
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-02-02T13:26:55Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: bucket &amp;#39;my-new-bucket&amp;#39; does not exist
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: BucketOperationFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: FetchFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./bucket/default/minio-bucket/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning BucketOperationFailed 37s (x11 over 42s) source-controller bucket &amp;#39;my-new-bucket&amp;#39; does not exist
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="trace-emitted-events">Trace emitted Events&lt;/h4>
&lt;p>To view events for specific Bucket(s), &lt;code>kubectl events&lt;/code> can be used in
combination with &lt;code>--for&lt;/code> to list the Events for specific objects. For example,
running&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 events --for Bucket/&amp;lt;bucket-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>lists&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2m30s Normal NewArtifact bucket/&amp;lt;bucket-name&amp;gt; fetched 16 files with revision from &amp;#39;my-new-bucket&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">36s Normal ArtifactUpToDate bucket/&amp;lt;bucket-name&amp;gt; artifact up-to-date with remote revision: &amp;#39;sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">18s Warning BucketOperationFailed bucket/&amp;lt;bucket-name&amp;gt; bucket &amp;#39;my-new-bucket&amp;#39; does not exist
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Besides being reported in Events, the reconciliation errors are also logged by
the controller. The Flux CLI offer commands for filtering the logs for a
specific Bucket, e.g. &lt;code>flux logs --level=error --kind=Bucket --name=&amp;lt;bucket-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h2 id="bucket-status">Bucket Status&lt;/h2>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The Bucket reports the latest synchronized state from the object storage
bucket as an Artifact object in the &lt;code>.status.artifact&lt;/code> of the resource.&lt;/p>
&lt;p>The Artifact file is a gzip compressed TAR archive
(&lt;code>&amp;lt;calculated revision&amp;gt;.tar.gz&lt;/code>), and can be retrieved in-cluster from the
&lt;code>.status.artifact.url&lt;/code> HTTP address.&lt;/p>
&lt;h4 id="artifact-example">Artifact example&lt;/h4>
&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>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;bucket-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:cbec34947cc2f36dee8adcdd12ee62ca6a8a36699fc6e56f6220385ad5bd421a&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2024-01-28T10:30:30Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>bucket/&amp;lt;namespace&amp;gt;/&amp;lt;bucket-name&amp;gt;/c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">38099&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.&amp;lt;namespace&amp;gt;.svc.cluster.local./bucket/&amp;lt;namespace&amp;gt;/&amp;lt;bucket-name&amp;gt;/c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="default-exclusions">Default exclusions&lt;/h4>
&lt;p>The following files and extensions are excluded from the Artifact by
default:&lt;/p>
&lt;ul>
&lt;li>Git files (&lt;code>.git/, .gitignore, .gitmodules, .gitattributes&lt;/code>)&lt;/li>
&lt;li>File extensions (&lt;code>.jpg, .jpeg, .gif, .png, .wmv, .flv, .tar.gz, .zip&lt;/code>)&lt;/li>
&lt;li>CI configs (&lt;code>.github/, .circleci/, .travis.yml, .gitlab-ci.yml, appveyor.yml, .drone.yml, cloudbuild.yaml, codeship-services.yml, codeship-steps.yml&lt;/code>)&lt;/li>
&lt;li>CLI configs (&lt;code>.goreleaser.yml, .sops.yaml&lt;/code>)&lt;/li>
&lt;li>Flux v1 config (&lt;code>.flux.yaml&lt;/code>)&lt;/li>
&lt;/ul>
&lt;p>To define your own exclusion rules, see
&lt;a href="#excluding-files">excluding files&lt;/a>.&lt;/p>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>A Bucket enters various states during its lifecycle, reflected as
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">Kubernetes Conditions&lt;/a>.
It can be
&lt;a href="#reconciling-bucket">reconciling&lt;/a> while fetching storage objects,
it can be
&lt;a href="#ready-bucket">ready&lt;/a>, or it can
&lt;a href="#failed-bucket">fail during
reconciliation&lt;/a>.&lt;/p>
&lt;p>The Bucket API is compatible with the
&lt;a href="https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus" target="_blank">kstatus specification&lt;/a>,
and reports &lt;code>Reconciling&lt;/code> and &lt;code>Stalled&lt;/code> conditions where applicable to
provide better (timeout) support to solutions polling the Bucket to become
&lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-bucket">Reconciling Bucket&lt;/h4>
&lt;p>The source-controller marks a Bucket as &lt;em>reconciling&lt;/em> when one of the following
is true:&lt;/p>
&lt;ul>
&lt;li>There is no current Artifact for the Bucket, or the reported Artifact is
determined to have disappeared from the storage.&lt;/li>
&lt;li>The generation of the Bucket is newer than the
&lt;a href="#observed-generation">Observed Generation&lt;/a>.&lt;/li>
&lt;li>The newly calculated Artifact revision differs from the current Artifact.&lt;/li>
&lt;/ul>
&lt;p>When the Bucket is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status becomes
&lt;code>Unknown&lt;/code> when the controller detects drift, and the controller adds a Condition
with the following attributes to the Bucket&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code> | &lt;code>reason: ProgressingWithRetry&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the reconciling state is due to a new revision, an additional Condition is
added with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactOutdated&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: NewRevision&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Both Conditions have a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and are only present on the Bucket while their status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-bucket">Ready Bucket&lt;/h4>
&lt;p>The source-controller marks a Bucket as &lt;em>ready&lt;/em> when it has the following
characteristics:&lt;/p>
&lt;ul>
&lt;li>The Bucket reports an
&lt;a href="#artifact">Artifact&lt;/a>.&lt;/li>
&lt;li>The reported Artifact exists in the controller&amp;rsquo;s Artifact storage.&lt;/li>
&lt;li>The Bucket was able to communicate with the Bucket&amp;rsquo;s object storage endpoint
using the current spec.&lt;/li>
&lt;li>The revision of the reported Artifact is up-to-date with the latest
calculated revision of the object storage bucket.&lt;/li>
&lt;/ul>
&lt;p>When the Bucket is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the following
attributes in the Bucket&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the Bucket
is marked as
&lt;a href="#reconciling-bucket">reconciling&lt;/a>, or e.g. a
&lt;a href="#failed-bucket">transient error&lt;/a> occurs due to a temporary network issue.&lt;/p>
&lt;p>When the Bucket Artifact is archived in the controller&amp;rsquo;s Artifact
storage, the controller sets a Condition with the following attributes in the
Bucket&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactInStorage&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>ArtifactInStorage&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until
the Artifact in the storage no longer exists.&lt;/p>
&lt;h4 id="failed-bucket">Failed Bucket&lt;/h4>
&lt;p>The source-controller may get stuck trying to produce an Artifact for a Bucket
without completing. This can occur due to some of the following factors:&lt;/p>
&lt;ul>
&lt;li>The object storage
&lt;a href="#endpoint">Endpoint&lt;/a> is temporarily unavailable.&lt;/li>
&lt;li>The specified object storage bucket does not exist.&lt;/li>
&lt;li>The
&lt;a href="#secret-reference">Secret reference&lt;/a> contains a reference to a
non-existing Secret.&lt;/li>
&lt;li>The credentials in the referenced Secret are invalid.&lt;/li>
&lt;li>The Bucket spec contains a generic misconfiguration.&lt;/li>
&lt;li>A storage related failure when storing the artifact.&lt;/li>
&lt;/ul>
&lt;p>When this happens, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
and adds a Condition with the following attributes to the Bucket&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: FetchFailed&lt;/code> | &lt;code>type: StorageOperationFailed&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AuthenticationFailed&lt;/code> | &lt;code>reason: BucketOperationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This condition has a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and is only present on the Bucket while the status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.
There may be more arbitrary values for the &lt;code>reason&lt;/code> field to provide accurate
reason for a condition.&lt;/p>
&lt;p>While the Bucket has this Condition, the controller will continue to attempt
to produce an Artifact for the resource with an exponential backoff, until
it succeeds and the Bucket is marked as
&lt;a href="#ready-bucket">ready&lt;/a>.&lt;/p>
&lt;p>Note that a Bucket can be
&lt;a href="#reconciling-bucket">reconciling&lt;/a> while failing at
the same time, for example due to a newly introduced configuration issue in the
Bucket spec. When a reconciliation fails, the &lt;code>Reconciling&lt;/code> Condition reason
would be &lt;code>ProgressingWithRetry&lt;/code>. When the reconciliation is performed again
after the failure, the reason is updated to &lt;code>Progressing&lt;/code>.&lt;/p>
&lt;h3 id="observed-ignore">Observed Ignore&lt;/h3>
&lt;p>The source-controller reports an observed ignore in the Bucket&amp;rsquo;s
&lt;code>.status.observedIgnore&lt;/code>. The observed ignore is the latest &lt;code>.spec.ignore&lt;/code> value
which resulted in a
&lt;a href="#ready-bucket">ready state&lt;/a>, or stalled due to error
it can not recover from without human intervention. The value is the same as the
&lt;a href="#ignore">ignore in spec&lt;/a>. It indicates the ignore rules used in building the
current artifact in storage.&lt;/p>
&lt;p>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:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedIgnore&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> hpa.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> build&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&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;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The source-controller reports an
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">observed generation&lt;/a>
in the Bucket&amp;rsquo;s &lt;code>.status.observedGeneration&lt;/code>. The observed generation is the
latest &lt;code>.metadata.generation&lt;/code> which resulted in either a
&lt;a href="#ready-bucket">ready state&lt;/a>,
or stalled due to error it can not recover from without human
intervention.&lt;/p>
&lt;h3 id="last-handled-reconcile-at">Last Handled Reconcile At&lt;/h3>
&lt;p>The source-controller reports the last &lt;code>reconcile.fluxcd.io/requestedAt&lt;/code>
annotation value it acted on in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;p>For practical information about this field, see
&lt;a href="#triggering-a-reconcile">triggering a
reconcile&lt;/a>.&lt;/p></description></item><item><title>Flux: Helm Repositories</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmrepositories/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmrepositories/</guid><description>
&lt;p>There are 2
&lt;a href="#type">Helm repository types&lt;/a> defined by the &lt;code>HelmRepository&lt;/code> API:&lt;/p>
&lt;ul>
&lt;li>Helm HTTP/S repository, which defines a Source to produce an Artifact for a Helm
repository index YAML (&lt;code>index.yaml&lt;/code>).&lt;/li>
&lt;li>OCI Helm repository, which defines a source that does not produce an Artifact.
It&amp;rsquo;s a data container to store the information about the OCI repository that
can be used by
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmcharts/">HelmChart&lt;/a> to access OCI Helm charts.&lt;/li>
&lt;/ul>
&lt;h2 id="examples">Examples&lt;/h2>
&lt;h3 id="helm-https-repository">Helm HTTP/S repository&lt;/h3>
&lt;p>The following is an example of a HelmRepository. It creates a YAML (&lt;code>.yaml&lt;/code>)
Artifact from the fetched Helm repository index (in this example the
&lt;a href="https://github.com/stefanprodan/podinfo" target="_blank">podinfo
repository&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>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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>A HelmRepository named &lt;code>podinfo&lt;/code> is created, indicated by the
&lt;code>.metadata.name&lt;/code> field.&lt;/li>
&lt;li>The source-controller fetches the Helm repository index YAML every five
minutes from &lt;code>https://stefanprodan.github.io/podinfo&lt;/code>, indicated by the
&lt;code>.spec.interval&lt;/code> and &lt;code>.spec.url&lt;/code> fields.&lt;/li>
&lt;li>The digest (algorithm defaults to SHA256) of the Helm repository index after
stable sorting the entries is used as Artifact revision, reported in-cluster
in the &lt;code>.status.artifact.revision&lt;/code> field.&lt;/li>
&lt;li>When the current HelmRepository revision differs from the latest fetched
revision, it is stored as a new Artifact.&lt;/li>
&lt;li>The new Artifact is reported in the &lt;code>.status.artifact&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>You can run this example by saving the manifest into &lt;code>helmrepository.yaml&lt;/code>.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f helmrepository.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get helmrepository&lt;/code> to see the HelmRepository:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME URL AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo https://stefanprodan.github.io/podinfo 4s True stored artifact for revision &amp;#39;sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl describe helmrepository podinfo&lt;/code> to see the
&lt;a href="#artifact">Artifact&lt;/a>
and
&lt;a href="#conditions">Conditions&lt;/a> in the HelmRepository&amp;rsquo;s 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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Artifact:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Digest: sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Update Time: 2022-02-04T09:55:58Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Path: helmrepository/default/podinfo/index-83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Revision: sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Size: 40898
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./helmrepository/default/podinfo/index-83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-04T09:55:58Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-04T09:55:58Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: stored artifact for revision &amp;#39;sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Succeeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: ArtifactInStorage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./helmrepository/default/podinfo/index.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal NewArtifact 1m source-controller fetched index of size 30.88kB from &amp;#39;https://stefanprodan.github.io/podinfo&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h3 id="helm-oci-repository">Helm OCI repository&lt;/h3>
&lt;p>The following is an example of an OCI HelmRepository.&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;oci&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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://ghcr.io/stefanprodan/charts&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>A HelmRepository named &lt;code>podinfo&lt;/code> is created, indicated by the
&lt;code>.metadata.name&lt;/code> field.&lt;/li>
&lt;li>A HelmChart that refers to this HelmRepository uses the URL in the &lt;code>.spec.url&lt;/code>
field to access the OCI Helm chart.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>NOTE:&lt;/strong> The &lt;code>.spec.interval&lt;/code> field is only used by the &lt;code>default&lt;/code> Helm
repository and is ignored for any value in &lt;code>oci&lt;/code> Helm repository.&lt;/p>
&lt;p>You can run this example by saving the manifest into &lt;code>helmrepository.yaml&lt;/code>.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f helmrepository.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get helmrepository&lt;/code> to see the HelmRepository:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME URL AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo oci://ghcr.io/stefanprodan/charts 3m22s
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;p>Because the OCI Helm repository is a data container, there&amp;rsquo;s nothing to report
for &lt;code>READY&lt;/code> and &lt;code>STATUS&lt;/code> columns above. The existence of the object can be
considered to be ready for use.&lt;/p>
&lt;h2 id="writing-a-helmrepository-spec">Writing a HelmRepository spec&lt;/h2>
&lt;p>As with all other Kubernetes config, a HelmRepository needs &lt;code>apiVersion&lt;/code>,
&lt;code>kind&lt;/code>, and &lt;code>metadata&lt;/code> fields. The name of a HelmRepository object must be a
valid
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names#dns-subdomain-names" target="_blank">DNS subdomain name&lt;/a>.&lt;/p>
&lt;p>A HelmRepository also needs a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" target="_blank">&lt;code>.spec&lt;/code> section&lt;/a>.&lt;/p>
&lt;h3 id="type">Type&lt;/h3>
&lt;p>&lt;code>.spec.type&lt;/code> is an optional field that specifies the Helm repository type.&lt;/p>
&lt;p>Possible values are &lt;code>default&lt;/code> for a Helm HTTP/S repository, or &lt;code>oci&lt;/code> for an OCI Helm repository.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong>: For improved support for OCI Helm charts, please use the
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/ocirepositories/">&lt;code>OCIRepository&lt;/code>&lt;/a> API.&lt;/p>
&lt;h3 id="provider">Provider&lt;/h3>
&lt;p>&lt;code>.spec.provider&lt;/code> is an optional field that allows specifying an OIDC provider used
for authentication purposes.&lt;/p>
&lt;p>Supported options are:&lt;/p>
&lt;ul>
&lt;li>&lt;code>generic&lt;/code>&lt;/li>
&lt;li>&lt;code>aws&lt;/code>&lt;/li>
&lt;li>&lt;code>azure&lt;/code>&lt;/li>
&lt;li>&lt;code>gcp&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>generic&lt;/code> provider can be used for public repositories or when static credentials
are used for authentication. If you do not specify &lt;code>.spec.provider&lt;/code>, it defaults
to &lt;code>generic&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note&lt;/strong>: The provider field is supported only for Helm OCI repositories. The &lt;code>spec.type&lt;/code>
field must be set to &lt;code>oci&lt;/code>.&lt;/p>
&lt;h4 id="aws">AWS&lt;/h4>
&lt;p>The &lt;code>aws&lt;/code> provider can be used to authenticate automatically using the EKS worker
node IAM role or IAM Role for Service Accounts (IRSA), and by extension gain access
to ECR.&lt;/p>
&lt;h5 id="eks-worker-node-iam-role">EKS Worker Node IAM Role&lt;/h5>
&lt;p>When the worker node IAM role has access to ECR, source-controller running on it
will also have access to ECR.&lt;/p>
&lt;h5 id="iam-role-for-service-accounts-irsa">IAM Role for Service Accounts (IRSA)&lt;/h5>
&lt;p>When using IRSA to enable access to ECR, add the following patch to your bootstrap
repository, in the &lt;code>flux-system/kustomization.yaml&lt;/code> 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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> eks.amazonaws.com/role-arn: &amp;lt;role arn&amp;gt;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">target&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>source-controller&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that you can attach the AWS managed policy &lt;code>arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly&lt;/code>
to the IAM role when using IRSA.&lt;/p>
&lt;h4 id="azure">Azure&lt;/h4>
&lt;p>The &lt;code>azure&lt;/code> provider can be used to authenticate automatically using Workload Identity and Kubelet Managed
Identity to gain access to ACR.&lt;/p>
&lt;h5 id="kubelet-managed-identity">Kubelet Managed Identity&lt;/h5>
&lt;p>When the kubelet managed identity has access to ACR, source-controller running on
it will also have access to ACR.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> If you have more than one identity configured on the cluster, you have to specify which one to use
by setting the &lt;code>AZURE_CLIENT_ID&lt;/code> environment variable in the source-controller deployment.&lt;/p>
&lt;p>If you are running into further issues, please look at the
&lt;a href="https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/TROUBLESHOOTING.md#azure-virtual-machine-managed-identity" target="_blank">troubleshooting guide&lt;/a>.&lt;/p>
&lt;h5 id="azure-workload-identity">Azure Workload Identity&lt;/h5>
&lt;p>When using Workload Identity to enable access to ACR, add the following patch to
your bootstrap repository, in the &lt;code>flux-system/kustomization.yaml&lt;/code> 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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/client-id: &amp;lt;AZURE_CLIENT_ID&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &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">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|-&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"> apiVersion: apps/v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: Deployment
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> namespace: flux-system
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> spec:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> template:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> labels:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> azure.workload.identity/use: &amp;#34;true&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Ensure Workload Identity is properly set up on your cluster and the mutating webhook is installed.
Create an identity that has access to ACR. Next, establish
a federated identity between the source-controller ServiceAccount and the
identity. Patch the source-controller Deployment and ServiceAccount as shown in the patch
above. Please take a look at this
&lt;a href="https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject" target="_blank">guide&lt;/a>.&lt;/p>
&lt;h4 id="gcp">GCP&lt;/h4>
&lt;p>The &lt;code>gcp&lt;/code> provider can be used to authenticate automatically using OAuth scopes or
Workload Identity, and by extension gain access to GCR or Artifact Registry.&lt;/p>
&lt;h5 id="access-scopes">Access Scopes&lt;/h5>
&lt;p>When the GKE nodes have the appropriate OAuth scope for accessing GCR and Artifact Registry,
source-controller running on it will also have access to them.&lt;/p>
&lt;h5 id="gke-workload-identity">GKE Workload Identity&lt;/h5>
&lt;p>When using Workload Identity to enable access to GCR or Artifact Registry, add the
following patch to your bootstrap repository, in the &lt;code>flux-system/kustomization.yaml&lt;/code>
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-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>kustomize.config.k8s.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- gotk-components.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>- gotk-sync.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">patches&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">patch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>|&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"> apiVersion: v1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> kind: ServiceAccount
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> metadata:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> name: source-controller
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> annotations:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> iam.gke.io/gcp-service-account: &amp;lt;identity-name&amp;gt;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">target&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>source-controller&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The Artifact Registry service uses the permission &lt;code>artifactregistry.repositories.downloadArtifacts&lt;/code>
that is located under the Artifact Registry Reader role. If you are using Google Container Registry service,
the needed permission is instead &lt;code>storage.objects.list&lt;/code> which can be bound as part
of the Container Registry Service Agent role. Take a look at
&lt;a href="https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity" target="_blank">this guide&lt;/a>
for more information about setting up GKE Workload Identity.&lt;/p>
&lt;h3 id="insecure">Insecure&lt;/h3>
&lt;p>&lt;code>.spec.insecure&lt;/code> is an optional field to allow connecting to an insecure (HTTP)
container registry server, if set to &lt;code>true&lt;/code>. The default value is &lt;code>false&lt;/code>,
denying insecure non-TLS connections when fetching Helm chart OCI artifacts.&lt;/p>
&lt;p>&lt;strong>Note&lt;/strong>: The insecure field is supported only for Helm OCI repositories.
The &lt;code>spec.type&lt;/code> field must be set to &lt;code>oci&lt;/code>.&lt;/p>
&lt;h3 id="interval">Interval&lt;/h3>
&lt;p>&lt;strong>Note:&lt;/strong> This field is ineffectual for
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>.&lt;/p>
&lt;p>&lt;code>.spec.interval&lt;/code> is a an optional field that specifies the interval which the
Helm repository index must be consulted at. When not set, the default value is
&lt;code>1m&lt;/code>.&lt;/p>
&lt;p>After successfully reconciling a HelmRepository object, the source-controller
requeues the object for inspection after the specified interval. The value
must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>10m0s&lt;/code> to fetch the HelmRepository index YAML every 10 minutes.&lt;/p>
&lt;p>If the &lt;code>.metadata.generation&lt;/code> of a resource changes (due to e.g. applying a
change to the spec), this is handled instantly outside the interval window.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple HelmRepository objects
are set up with the same interval. For more information, please refer to the
&lt;a href="https://fluxcd.io/flux/components/source/options/" target="_blank">source-controller configuration options&lt;/a>.&lt;/p>
&lt;h3 id="url">URL&lt;/h3>
&lt;p>&lt;code>.spec.url&lt;/code> is a required field that depending on the
&lt;a href="#type">type of the HelmRepository object&lt;/a>
specifies the HTTP/S or OCI address of a Helm repository.&lt;/p>
&lt;p>For OCI, the URL is expected to point to a registry repository, e.g. &lt;code>oci://ghcr.io/fluxcd/source-controller&lt;/code>.&lt;/p>
&lt;p>For Helm repositories which require authentication, see
&lt;a href="#secret-reference">Secret reference&lt;/a>.&lt;/p>
&lt;h3 id="timeout">Timeout&lt;/h3>
&lt;p>&lt;strong>Note:&lt;/strong> This field is not applicable to
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>.&lt;/p>
&lt;p>&lt;code>.spec.timeout&lt;/code> is an optional field to specify a timeout for the fetch
operation. The value must be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>1m30s&lt;/code> for a timeout of one minute and thirty seconds. When not set, the
default value is &lt;code>1m&lt;/code>.&lt;/p>
&lt;h3 id="secret-reference">Secret reference&lt;/h3>
&lt;p>&lt;code>.spec.secretRef.name&lt;/code> is an optional field to specify a name reference to a
Secret in the same namespace as the HelmRepository, containing authentication
credentials for the repository.&lt;/p>
&lt;h4 id="basic-access-authentication">Basic access authentication&lt;/h4>
&lt;p>To authenticate towards a Helm repository using basic access authentication
(in other words: using a username and password), the referenced Secret is
expected to contain &lt;code>.data.username&lt;/code> and &lt;code>.data.password&lt;/code> values.&lt;/p>
&lt;p>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:#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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example-user&lt;span style="color:#bbb">
&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>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>example-user&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;span style="color:#4070a0">&amp;#34;user-123456&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">password&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;pass-123456&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>OCI Helm repository 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:#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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://ghcr.io/my-user/my-private-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:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;oci&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">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>oci-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:#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>oci-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">stringData&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;span style="color:#4070a0">&amp;#34;user-123456&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">password&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;pass-123456&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For OCI Helm repositories, Kubernetes secrets of type
&lt;a href="https://kubernetes.io/docs/concepts/configuration/secret/#secret-types" target="_blank">kubernetes.io/dockerconfigjson&lt;/a> are also supported.
It is possible to create one such secret with &lt;code>kubectl create secret docker-registry&lt;/code>
or using the Flux CLI:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>flux create secret oci ghcr-auth \&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>--url=ghcr.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>--username=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>--password=${GITHUB_PAT}&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Warning:&lt;/strong> Support for specifying TLS authentication data using this API has been
deprecated. Please use
&lt;a href="#cert-secret-reference">&lt;code>.spec.certSecretRef&lt;/code>&lt;/a> instead.
If the controller uses the secret specified by this field to configure TLS, then
a deprecation warning will be logged.&lt;/p>
&lt;h3 id="mutual-tls-authentication">Mutual TLS Authentication&lt;/h3>
&lt;p>&lt;code>.spec.certSecretRef.name&lt;/code> is an optional field to specify a secret containing
TLS certificate data for mutual TLS authentication.&lt;/p>
&lt;p>To authenticate towards a Helm repository using mutual TLS,
the referenced Secret&amp;rsquo;s &lt;code>.data&lt;/code> should contain the following keys:&lt;/p>
&lt;ul>
&lt;li>&lt;code>tls.crt&lt;/code> and &lt;code>tls.key&lt;/code>, to specify the client certificate and private key used
for TLS client authentication. These must be used in conjunction, i.e.
specifying one without the other will lead to an error.&lt;/li>
&lt;li>&lt;code>ca.crt&lt;/code>, to specify the CA certificate used to verify the server, which is
required if the server is using a self-signed certificate.&lt;/li>
&lt;/ul>
&lt;p>The Secret should be of type &lt;code>Opaque&lt;/code> or &lt;code>kubernetes.io/tls&lt;/code>. All the files in
the Secret are expected to be
&lt;a href="https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail" target="_blank">PEM-encoded&lt;/a>. Assuming you have
three files; &lt;code>client.key&lt;/code>, &lt;code>client.crt&lt;/code> and &lt;code>ca.crt&lt;/code> for the client private key,
client certificate and the CA certificate respectively, you can generate the
required Secret using the &lt;code>flux create secret tls&lt;/code> command:&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 secret tls --tls-key-file&lt;span style="color:#666">=&lt;/span>client.key --tls-crt-file&lt;span style="color:#666">=&lt;/span>client.crt --ca-crt-file&lt;span style="color:#666">=&lt;/span>ca.crt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Example usage:&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>example&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">certSecretRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>example-tls&lt;span style="color:#bbb">
&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>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>example-tls&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kubernetes.io/tls&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># or Opaque&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">tls.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">tls.key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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"># NOTE: Can be supplied without the above 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">ca.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="pass-credentials">Pass credentials&lt;/h3>
&lt;p>&lt;code>.spec.passCredentials&lt;/code> is an optional field to allow the credentials from the
&lt;a href="#secret-reference">Secret reference&lt;/a> to be passed on to a host that does not
match the host as defined in URL. This may for example be required if the host
advertised chart URLs in the index differ from the specified URL.&lt;/p>
&lt;p>Enabling this should be done with caution, as it can potentially result in
credentials getting stolen in a man-in-the-middle attack. This feature only applies
to HTTP/S Helm repositories.&lt;/p>
&lt;h3 id="suspend">Suspend&lt;/h3>
&lt;p>&lt;strong>Note:&lt;/strong> This field is not applicable to
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>.&lt;/p>
&lt;p>&lt;code>.spec.suspend&lt;/code> is an optional field to suspend the reconciliation of a
HelmRepository. When set to &lt;code>true&lt;/code>, the controller will stop reconciling the
HelmRepository, and changes to the resource or the Helm repository index will
not result in a new Artifact. When the field is set to &lt;code>false&lt;/code> or removed, it
will resume.&lt;/p>
&lt;p>For practical information, see
&lt;a href="#suspending-and-resuming">suspending and resuming&lt;/a>.&lt;/p>
&lt;h2 id="working-with-helmrepositories">Working with HelmRepositories&lt;/h2>
&lt;p>&lt;strong>Note:&lt;/strong> This section does not apply to
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>, being a data container, once created, they
are ready to used by
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmcharts/">HelmCharts&lt;/a>.&lt;/p>
&lt;h3 id="triggering-a-reconcile">Triggering a reconcile&lt;/h3>
&lt;p>To manually tell the source-controller to reconcile a HelmRepository outside the
&lt;a href="#interval">specified interval window&lt;/a>, a HelmRepository can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the object for reconciliation if the &lt;code>&amp;lt;arbitrary-value&amp;gt;&lt;/code> differs from
the last value the controller acted on, as reported in
&lt;a href="#last-handled-reconcile-at">&lt;code>.status.lastHandledReconcileAt&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 annotate --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply --overwrite helmrepository/&amp;lt;repository-name&amp;gt; reconcile.fluxcd.io/requestedAt&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>date +%s&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux reconcile &lt;span style="color:#007020">source&lt;/span> helm &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="waiting-for-ready">Waiting for &lt;code>Ready&lt;/code>&lt;/h3>
&lt;p>When a change is applied, it is possible to wait for the HelmRepository to
reach a
&lt;a href="#ready-helmrepository">ready state&lt;/a> using &lt;code>kubectl&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 &lt;span style="color:#007020">wait&lt;/span> helmrepository/&amp;lt;repository-name&amp;gt; --for&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">condition&lt;/span>&lt;span style="color:#666">=&lt;/span>ready --timeout&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspending-and-resuming">Suspending and resuming&lt;/h3>
&lt;p>When you find yourself in a situation where you temporarily want to pause the
reconciliation of a HelmRepository, you can suspend it using the
&lt;a href="#suspend">&lt;code>.spec.suspend&lt;/code> field&lt;/a>.&lt;/p>
&lt;h4 id="suspend-a-helmrepository">Suspend a HelmRepository&lt;/h4>
&lt;p>In your YAML declaration:&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>&amp;lt;repository-name&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">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">suspend&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>Using &lt;code>kubectl&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 patch helmrepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34;: {\&amp;#34;suspend\&amp;#34; : true }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux &lt;span style="color:#007020">suspend&lt;/span> &lt;span style="color:#007020">source&lt;/span> helm &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When a HelmRepository has an Artifact and is suspended, and this
Artifact later disappears from the storage due to e.g. the source-controller
Pod being evicted from a Node, this will not be reflected in the
HelmRepository&amp;rsquo;s Status until it is resumed.&lt;/p>
&lt;h4 id="resume-a-helmrepository">Resume a HelmRepository&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the field:&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>&amp;lt;repository-name&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">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"># suspend: true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> Setting the field value to &lt;code>false&lt;/code> has the same effect as removing
it, but does not allow for &amp;ldquo;hot patching&amp;rdquo; using e.g. &lt;code>kubectl&lt;/code> while practicing
GitOps; as the manually applied patch would be overwritten by the declared
state in Git.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 patch helmrepository &amp;lt;repository-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34; : {\&amp;#34;suspend\&amp;#34; : false }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Using &lt;code>flux&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>flux resume &lt;span style="color:#007020">source&lt;/span> helm &amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-a-helmrepository">Debugging a HelmRepository&lt;/h3>
&lt;p>&lt;strong>Note:&lt;/strong> This section does not apply to
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>, being a data container, they are static
objects that don&amp;rsquo;t require debugging if valid.&lt;/p>
&lt;p>There are several ways to gather information about a HelmRepository for debugging
purposes.&lt;/p>
&lt;h4 id="describe-the-helmrepository">Describe the HelmRepository&lt;/h4>
&lt;p>Describing a HelmRepository using &lt;code>kubectl describe helmrepository &amp;lt;repository-name&amp;gt;&lt;/code>
displays the latest recorded information for the resource in the &lt;code>Status&lt;/code> and
&lt;code>Events&lt;/code> sections:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-04T13:41:56Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to construct Helm client: scheme &amp;#34;invalid&amp;#34; not supported
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Failed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Stalled
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-04T13:41:56Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to construct Helm client: scheme &amp;#34;invalid&amp;#34; not supported
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Failed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: False
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-04T13:41:56Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to construct Helm client: scheme &amp;#34;invalid&amp;#34; not supported
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: Failed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: FetchFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.source-system.svc.cluster.local./helmrepository/default/podinfo/index.yaml
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning Failed 6s source-controller failed to construct Helm client: scheme &amp;#34;invalid&amp;#34; not supported
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="trace-emitted-events">Trace emitted Events&lt;/h4>
&lt;p>To view events for specific HelmRepository(s), &lt;code>kubectl events&lt;/code> can be used in
combination with &lt;code>--for&lt;/code> to list the Events for specific objects. For example,
running&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 events --for HelmRepository/&amp;lt;repository-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>lists&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">107s Warning Failed helmrepository/&amp;lt;repository-name&amp;gt; failed to construct Helm client: scheme &amp;#34;invalid&amp;#34; not supported
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">7s Normal NewArtifact helmrepository/&amp;lt;repository-name&amp;gt; fetched index of size 30.88kB from &amp;#39;https://stefanprodan.github.io/podinfo&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">3s Normal ArtifactUpToDate helmrepository/&amp;lt;repository-name&amp;gt; artifact up-to-date with remote revision: &amp;#39;sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Besides being reported in Events, the reconciliation errors are also logged by
the controller. The Flux CLI offer commands for filtering the logs for a
specific HelmRepository, e.g. &lt;code>flux logs --level=error --kind=HelmRepository --name=&amp;lt;chart-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h2 id="helmrepository-status">HelmRepository Status&lt;/h2>
&lt;p>&lt;strong>Note:&lt;/strong> This section does not apply to
&lt;a href="#helm-oci-repository">OCI Helm
Repositories&lt;/a>, they do not contain any information in the
status.&lt;/p>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The HelmRepository reports the last fetched repository index as an Artifact
object in the &lt;code>.status.artifact&lt;/code> of the resource.&lt;/p>
&lt;p>The Artifact file is an exact copy of the Helm repository index YAML
(&lt;code>index-&amp;lt;revision&amp;gt;.yaml&lt;/code>) as fetched, and can be retrieved in-cluster from the
&lt;code>.status.artifact.url&lt;/code> HTTP address.&lt;/p>
&lt;h4 id="artifact-example">Artifact example&lt;/h4>
&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>&amp;lt;repository-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2022-02-04T09:55:58Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helmrepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/index-83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111.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">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">40898&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.flux-system.svc.cluster.local./helmrepository/&amp;lt;namespace&amp;gt;/&amp;lt;repository-name&amp;gt;/index-83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111.yaml&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>A HelmRepository enters various states during its lifecycle, reflected as
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">Kubernetes
Conditions&lt;/a>.
It can be
&lt;a href="#reconciling-helmrepository">reconciling&lt;/a> while fetching the
repository index, it can be
&lt;a href="#ready-helmrepository">ready&lt;/a>, it can
&lt;a href="#failed-helmrepository">fail during reconciliation&lt;/a>, or it can
&lt;a href="#stalled-helmrepository">stall&lt;/a>.&lt;/p>
&lt;p>The HelmRepository API is compatible with the
&lt;a href="https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus" target="_blank">kstatus
specification&lt;/a>,
and reports &lt;code>Reconciling&lt;/code> and &lt;code>Stalled&lt;/code> conditions where applicable to
provide better (timeout) support to solutions polling the HelmRepository to become
&lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-helmrepository">Reconciling HelmRepository&lt;/h4>
&lt;p>The source-controller marks a HelmRepository as &lt;em>reconciling&lt;/em> when one of the following
is true:&lt;/p>
&lt;ul>
&lt;li>There is no current Artifact for the HelmRepository, or the reported Artifact
is determined to have disappeared from the storage.&lt;/li>
&lt;li>The generation of the HelmRepository is newer than the
&lt;a href="#observed-generation">Observed
Generation&lt;/a>.&lt;/li>
&lt;li>The newly fetched Artifact revision differs from the current Artifact.&lt;/li>
&lt;/ul>
&lt;p>When the HelmRepository is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status becomes
&lt;code>Unknown&lt;/code> when the controller detects drift, and the controller adds a Condition
with the following attributes to the HelmRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code> | &lt;code>reason: ProgressingWithRetry&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the reconciling state is due to a new revision, it adds an additional
Condition with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactOutdated&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: NewRevision&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Both Conditions have a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and are only present on the HelmRepository while their status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-helmrepository">Ready HelmRepository&lt;/h4>
&lt;p>The source-controller marks a HelmRepository as &lt;em>ready&lt;/em> when it has the following
characteristics:&lt;/p>
&lt;ul>
&lt;li>The HelmRepository reports an
&lt;a href="#artifact">Artifact&lt;/a>.&lt;/li>
&lt;li>The reported Artifact exists in the controller&amp;rsquo;s Artifact storage.&lt;/li>
&lt;li>The controller was able to fetch the Helm repository index using the current
spec.&lt;/li>
&lt;li>The revision of the reported Artifact is up-to-date with the latest
revision of the Helm repository.&lt;/li>
&lt;/ul>
&lt;p>When the HelmRepository is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the following
attributes in the HelmRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the
HelmRepository is marked as
&lt;a href="#reconciling-helmrepository">reconciling&lt;/a>, or e.g.
a
&lt;a href="#failed-helmrepository">transient error&lt;/a> occurs due to a temporary network
issue.&lt;/p>
&lt;p>When the HelmRepository Artifact is archived in the controller&amp;rsquo;s Artifact
storage, the controller sets a Condition with the following attributes in the
HelmRepository&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactInStorage&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>ArtifactInStorage&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until
the Artifact in the storage no longer exists.&lt;/p>
&lt;h4 id="failed-helmrepository">Failed HelmRepository&lt;/h4>
&lt;p>The source-controller may get stuck trying to produce an Artifact for a
HelmRepository without completing. This can occur due to some of the following
factors:&lt;/p>
&lt;ul>
&lt;li>The Helm repository
&lt;a href="#url">URL&lt;/a> is temporarily unavailable.&lt;/li>
&lt;li>The
&lt;a href="#secret-reference">Secret reference&lt;/a> contains a reference to a
non-existing Secret.&lt;/li>
&lt;li>The credentials in the referenced Secret are invalid.&lt;/li>
&lt;li>The HelmRepository spec contains a generic misconfiguration.&lt;/li>
&lt;li>A storage related failure when storing the artifact.&lt;/li>
&lt;/ul>
&lt;p>When this happens, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
and adds a Condition with the following attributes to the HelmRepository&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: FetchFailed&lt;/code> | &lt;code>type: StorageOperationFailed&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AuthenticationFailed&lt;/code> | &lt;code>reason: IndexationFailed&lt;/code> | &lt;code>reason: Failed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This condition has a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and is only present on the HelmRepository while the status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.
There may be more arbitrary values for the &lt;code>reason&lt;/code> field to provide accurate
reason for a condition.&lt;/p>
&lt;p>While the HelmRepository has this Condition, the controller will continue to
attempt to produce an Artifact for the resource with an exponential backoff,
until it succeeds and the HelmRepository is marked as
&lt;a href="#ready-helmrepository">ready&lt;/a>.&lt;/p>
&lt;p>Note that a HelmRepository can be
&lt;a href="#reconciling-helmrepository">reconciling&lt;/a>
while failing at the same time, for example due to a newly introduced
configuration issue in the HelmRepository spec. When a reconciliation fails, the
&lt;code>Reconciling&lt;/code> Condition reason would be &lt;code>ProgressingWithRetry&lt;/code>. When the
reconciliation is performed again after the failure, the reason is updated to
&lt;code>Progressing&lt;/code>.&lt;/p>
&lt;h4 id="stalled-helmrepository">Stalled HelmRepository&lt;/h4>
&lt;p>The source-controller can mark a HelmRepository as &lt;em>stalled&lt;/em> when it determines
that without changes to the spec, the reconciliation can not succeed.
For example because a Helm repository URL with an unsupported protocol is
specified.&lt;/p>
&lt;p>When this happens, the controller sets the same Conditions as when it
&lt;a href="#failed-helmrepository">fails&lt;/a>, but adds another Condition with the following
attributes to the HelmRepository&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Stalled&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: URLInvalid&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>While the HelmRepository has this Condition, the controller will not requeue
the resource any further, and will stop reconciling the resource until a change
to the spec is made.&lt;/p>
&lt;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The source-controller reports an
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">observed generation&lt;/a>
in the HelmRepository&amp;rsquo;s &lt;code>.status.observedGeneration&lt;/code>. The observed generation is
the latest &lt;code>.metadata.generation&lt;/code> which resulted in either a
&lt;a href="#ready-helmrepository">ready state&lt;/a>,
or stalled due to error it can not recover from without human intervention.&lt;/p>
&lt;h3 id="last-handled-reconcile-at">Last Handled Reconcile At&lt;/h3>
&lt;p>The source-controller reports the last &lt;code>reconcile.fluxcd.io/requestedAt&lt;/code>
annotation value it acted on in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;p>For practical information about this field, see
&lt;a href="#triggering-a-reconcile">triggering a
reconcile&lt;/a>.&lt;/p></description></item><item><title>Flux: Helm Charts</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmcharts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmcharts/</guid><description>
&lt;p>The &lt;code>HelmChart&lt;/code> API defines a Source to produce an Artifact for a Helm chart
archive with a set of specific configurations.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of a HelmChart. It fetches and/or packages a Helm
chart and exposes it as a tarball (&lt;code>.tgz&lt;/code>) Artifact for the specified
configuration:&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>5m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">reconcileStrategy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ChartVersion&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;5.*&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example:&lt;/p>
&lt;ul>
&lt;li>A HelmChart named &lt;code>podinfo&lt;/code> is created, indicated by the &lt;code>.metadata.name&lt;/code>
field.&lt;/li>
&lt;li>The source-controller fetches the Helm chart every five minutes from the
&lt;code>podinfo&lt;/code> HelmRepository source reference, indicated by the
&lt;code>.spec.sourceRef.kind&lt;/code> and &lt;code>.spec.sourceRef.name&lt;/code> fields.&lt;/li>
&lt;li>The fetched Helm chart version is the latest available chart
version in the range specified in &lt;code>spec.version&lt;/code>. This version is also used as
Artifact revision, reported in-cluster in the &lt;code>.status.artifact.revision&lt;/code>
field.&lt;/li>
&lt;li>When the current Helm Chart version differs from the latest available chart
in the version range, it is fetched and/or packaged as a new Artifact.&lt;/li>
&lt;li>The new Artifact is reported in the &lt;code>.status.artifact&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>You can run this example by saving the manifest into &lt;code>helmchart.yaml&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> HelmChart is usually used by the helm-controller. Based on the
HelmRelease configuration, an associated HelmChart is created by the
helm-controller.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Apply the resource on 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-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>kubectl apply -f helmchart.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl get helmchart&lt;/code> to see the HelmChart:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">NAME CHART VERSION SOURCE KIND SOURCE NAME AGE READY STATUS
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo podinfo 5.* HelmRepository podinfo 53s True pulled &amp;#39;podinfo&amp;#39; chart with version &amp;#39;5.2.1&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Run &lt;code>kubectl describe helmchart podinfo&lt;/code> to see the
&lt;a href="#artifact">Artifact&lt;/a> and
&lt;a href="#conditions">Conditions&lt;/a> in the HelmChart&amp;rsquo;s 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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Source Artifact Revision: sha256:83a3c595163a6ff0333e0154c790383b5be441b9db632cb36da11db1c4ece111
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Artifact:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Digest: sha256:6c3cc3b955bce1686036ae6822ee2ca0ef6ecb994e3f2d19eaf3ec03dcba84b3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Update Time: 2022-02-13T11:24:10Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Path: helmchart/default/podinfo/podinfo-5.2.1.tgz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Revision: 5.2.1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Size: 14166
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./helmchart/default/podinfo/podinfo-5.2.1.tgz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-13T11:24:10Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: pulled &amp;#39;podinfo&amp;#39; chart with version &amp;#39;5.2.1&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: ChartPullSucceeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-13T11:24:10Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: pulled &amp;#39;podinfo&amp;#39; chart with version &amp;#39;5.2.1&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: ChartPullSucceeded
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: ArtifactInStorage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Chart Name: podinfo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./helmchart/default/podinfo/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal ChartPullSucceeded 2m51s source-controller pulled &amp;#39;podinfo&amp;#39; chart with version &amp;#39;5.2.1&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ol>
&lt;h2 id="writing-a-helmchart-spec">Writing a HelmChart spec&lt;/h2>
&lt;p>As with all other Kubernetes config, a HelmChart needs &lt;code>apiVersion&lt;/code>, &lt;code>kind&lt;/code>, and
&lt;code>metadata&lt;/code> fields. The name of a HelmChart object must be a valid
&lt;a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/names#dns-subdomain-names" target="_blank">DNS subdomain name&lt;/a>.&lt;/p>
&lt;p>A HelmChart also needs a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" target="_blank">&lt;code>.spec&lt;/code> section&lt;/a>.&lt;/p>
&lt;h3 id="source-reference">Source reference&lt;/h3>
&lt;p>&lt;code>.spec.sourceRef&lt;/code> is a required field that specifies a reference to the Source
the chart is available at.&lt;/p>
&lt;p>Supported references are:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/helmrepositories/">&lt;code>HelmRepository&lt;/code>&lt;/a>&lt;/li>
&lt;li>
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/gitrepositories/">&lt;code>GitRepository&lt;/code>&lt;/a>&lt;/li>
&lt;li>
&lt;a href="https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/buckets/">&lt;code>Bucket&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Although there are three kinds of source references, there are only two
underlying implementations. The artifact building process for &lt;code>GitRepository&lt;/code>
and &lt;code>Bucket&lt;/code> are the same as they are already built source artifacts. In case
of &lt;code>HelmRepository&lt;/code>, a chart is fetched and/or packaged based on the
configuration of the Helm chart.&lt;/p>
&lt;p>For a &lt;code>HelmChart&lt;/code> to be reconciled, the associated artifact in the source
reference must be ready. If the source artifact is not ready, the &lt;code>HelmChart&lt;/code>
reconciliation is retried.&lt;/p>
&lt;p>When the &lt;code>metadata.generation&lt;/code> of the &lt;code>HelmChart&lt;/code> don&amp;rsquo;t match with the
&lt;code>status.observedGeneration&lt;/code>, the chart is fetched from source and/or packaged.
If there&amp;rsquo;s no &lt;code>.spec.valuesFiles&lt;/code> specified, the chart is only fetched from the
source, and not packaged. If &lt;code>.spec.valuesFiles&lt;/code> are specified, the chart is
fetched and packaged with the values files. When the &lt;code>metadata.generation&lt;/code>
matches the &lt;code>status.observedGeneration&lt;/code>, the chart is only fetched from source
or from the cache if available, and not packaged.&lt;/p>
&lt;p>When using a &lt;code>HelmRepository&lt;/code> source reference, the secret reference defined in
the Helm repository is used to fetch the chart.&lt;/p>
&lt;p>The HelmChart reconciliation behavior varies depending on the source reference
kind, see
&lt;a href="#reconcile-strategy">reconcile strategy&lt;/a>.&lt;/p>
&lt;p>The attributes of the generated artifact also varies depending on the source
reference kind, see
&lt;a href="#artifact">artifact&lt;/a>.&lt;/p>
&lt;h3 id="chart">Chart&lt;/h3>
&lt;p>&lt;code>.spec.chart&lt;/code> is a required field that specifies the name or path the Helm chart
is available at in the
&lt;a href="#source-reference">Source reference&lt;/a>.&lt;/p>
&lt;p>For &lt;code>HelmRepository&lt;/code> Source reference, it&amp;rsquo;ll be just the name of the chart.&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">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">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">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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For &lt;code>GitRepository&lt;/code> and &lt;code>Bucket&lt;/code> Source reference, it&amp;rsquo;ll be the path to the
Helm chart directory.&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">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>./charts/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">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">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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;GitRepository|Bucket&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="version">Version&lt;/h3>
&lt;p>&lt;code>.spec.version&lt;/code> is an optional field to specify the version of the chart in
semver. It is applicable only when the Source reference is a &lt;code>HelmRepository&lt;/code>.
It is ignored for &lt;code>GitRepository&lt;/code> and &lt;code>Bucket&lt;/code> Source reference. It defaults to
the latest version of the chart with value &lt;code>*&lt;/code>.&lt;/p>
&lt;p>Version can be a fixed semver, minor or patch semver range of a specific
version (i.e. &lt;code>4.0.x&lt;/code>) or any semver range (i.e. &lt;code>&amp;gt;=4.0.0 &amp;lt;5.0.0&lt;/code>).&lt;/p>
&lt;h3 id="values-files">Values files&lt;/h3>
&lt;p>&lt;code>.spec.valuesFiles&lt;/code> is an optional field to specify an alternative list of
values files to use as the chart values (values.yaml). The file paths are
expected to be relative to the Source reference. Values files are merged in the
order of the list with the last file overriding the first. It is ignored when
omitted. When values files are specified, the chart is fetched and packaged
with the provided 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:#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">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:#bbb">
&lt;/span>&lt;/span>&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-production.yaml&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Values files also affect the generated artifact revision, see
&lt;a href="#artifact">artifact&lt;/a>.&lt;/p>
&lt;h3 id="ignore-missing-values-files">Ignore missing values files&lt;/h3>
&lt;p>&lt;code>.spec.ignoreMissingValuesFiles&lt;/code> is an optional field to specify whether missing
values files should be ignored rather than be considered errors. It defaults to
&lt;code>false&lt;/code>.&lt;/p>
&lt;p>When &lt;code>.spec.valuesFiles&lt;/code> and &lt;code>.spec.ignoreMissingValuesFiles&lt;/code> are specified,
the &lt;code>.status.observedValuesFiles&lt;/code> field is populated with the list of values
files that were found and actually contributed to the packaged chart.&lt;/p>
&lt;h3 id="reconcile-strategy">Reconcile strategy&lt;/h3>
&lt;p>&lt;code>.spec.reconcileStrategy&lt;/code> is an optional field to specify what enables the
creation of a new Artifact. Valid values are &lt;code>ChartVersion&lt;/code> and &lt;code>Revision&lt;/code>.
&lt;code>ChartVersion&lt;/code> is used for creating a new artifact when the chart version
changes in a &lt;code>HelmRepository&lt;/code>. &lt;code>Revision&lt;/code> is used for creating a new artifact
when the source revision changes in a &lt;code>GitRepository&lt;/code> or a &lt;code>Bucket&lt;/code> Source. It
defaults to &lt;code>ChartVersion&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> If the reconcile strategy is &lt;code>ChartVersion&lt;/code> and the source reference
is a &lt;code>GitRepository&lt;/code> or a &lt;code>Bucket&lt;/code>, no new chart artifact is produced on updates
to the source unless the &lt;code>version&lt;/code> in &lt;code>Chart.yaml&lt;/code> is incremented. To produce
new chart artifact on change in source revision, set the reconcile strategy to
&lt;code>Revision&lt;/code>.&lt;/p>
&lt;p>Reconcile strategy also affects the artifact version, see
&lt;a href="#artifact">artifact&lt;/a>
for more details.&lt;/p>
&lt;h3 id="interval">Interval&lt;/h3>
&lt;p>&lt;code>.spec.interval&lt;/code> is a required field that specifies the interval at which the
Helm Chart source must be checked for updates.&lt;/p>
&lt;p>After successfully reconciling a HelmChart object, the source-controller
requeues the object for inspection after the specified interval. The value must
be in a
&lt;a href="https://pkg.go.dev/time#ParseDuration" target="_blank">Go recognized duration string format&lt;/a>,
e.g. &lt;code>10m0s&lt;/code> to look at the source for updates every 10 minutes.&lt;/p>
&lt;p>If the &lt;code>.metadata.generation&lt;/code> of a resource changes (due to e.g. applying a
change to the spec), this is handled instantly outside the interval window.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> The controller can be configured to apply a jitter to the interval in
order to distribute the load more evenly when multiple HelmChart objects are set
up with the same interval. For more information, please refer to the
&lt;a href="https://fluxcd.io/flux/components/source/options/" target="_blank">source-controller configuration options&lt;/a>.&lt;/p>
&lt;h3 id="suspend">Suspend&lt;/h3>
&lt;p>&lt;code>.spec.suspend&lt;/code> is an optional field to suspend the reconciliation of a
HelmChart. When set to &lt;code>true&lt;/code>, the controller will stop reconciling the
HelmChart, and changes to the resource or the Helm chart Source will not result
in a new Artifact. When the field is set to &lt;code>false&lt;/code> or removed, it will resume.&lt;/p>
&lt;p>For practical information, see
&lt;a href="#suspending-and-resuming">suspending and resuming&lt;/a>.&lt;/p>
&lt;h3 id="verification">Verification&lt;/h3>
&lt;p>&lt;strong>Note:&lt;/strong> This feature is available only for Helm charts fetched from an OCI Registry.&lt;/p>
&lt;p>&lt;code>.spec.verify&lt;/code> is an optional field to enable the verification of
&lt;a href="https://github.com/sigstore/cosign" target="_blank">Cosign&lt;/a> or
&lt;a href="https://github.com/notaryproject/notation" target="_blank">Notation&lt;/a>
signatures. The field offers three subfields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.provider&lt;/code>, to specify the verification provider. The supported options are &lt;code>cosign&lt;/code> and &lt;code>notation&lt;/code> at present.&lt;/li>
&lt;li>&lt;code>.secretRef.name&lt;/code>, to specify a reference to a Secret in the same namespace as
the HelmChart, containing the public keys of trusted authors. For Notation this Secret should also include the
&lt;a href="https://github.com/notaryproject/specifications/blob/v1.0.0/specs/trust-store-trust-policy.md#trust-policy" target="_blank">trust policy&lt;/a> in
addition to the CA certificate.&lt;/li>
&lt;li>&lt;code>.matchOIDCIdentity&lt;/code>, to specify a list of OIDC identity matchers (only supported when using &lt;code>cosign&lt;/code> as the verification provider). Please see
&lt;a href="#keyless-verification">Keyless verification&lt;/a> for more details.&lt;/li>
&lt;/ul>
&lt;h4 id="cosign">Cosign&lt;/h4>
&lt;p>The &lt;code>cosign&lt;/code> provider can be used to verify the signature of an OCI artifact using either a known public key or via the
&lt;a href="https://github.com/sigstore/cosign/blob/main/KEYLESS.md" target="_blank">Cosign Keyless&lt;/a> procedure.&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>cosign&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>cosign-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the verification succeeds, the controller adds a Condition with the
following attributes to the HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;h5 id="public-keys-verification">Public keys verification&lt;/h5>
&lt;p>To verify the authenticity of HelmChart hosted in an OCI Registry, create a Kubernetes
secret with the Cosign public keys:&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>cosign-public-keys&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">key1.pub&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">key2.pub&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that the keys must have the &lt;code>.pub&lt;/code> extension for Flux to make use of them.&lt;/p>
&lt;p>Flux will loop over the public keys and use them to verify a HelmChart&amp;rsquo;s signature.
This allows for older HelmCharts to be valid as long as the right key is in the secret.&lt;/p>
&lt;h5 id="keyless-verification">Keyless verification&lt;/h5>
&lt;p>For publicly available HelmCharts, which are signed using the
&lt;a href="https://github.com/sigstore/cosign/blob/main/KEYLESS.md" target="_blank">Cosign Keyless&lt;/a> procedure,
you can enable the verification by omitting the &lt;code>.verify.secretRef&lt;/code> field.&lt;/p>
&lt;p>To verify the identity&amp;rsquo;s subject and the OIDC issuer present in the Fulcio
certificate, you can specify a list of OIDC identity matchers using
&lt;code>.spec.verify.matchOIDCIdentity&lt;/code>. The matcher provides two required fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.issuer&lt;/code>, to specify a regexp that matches against the OIDC issuer.&lt;/li>
&lt;li>&lt;code>.subject&lt;/code>, to specify a regexp that matches against the subject identity in
the certificate.
Both values should follow the
&lt;a href="https://golang.org/s/re2syntax" target="_blank">Go regular expression syntax&lt;/a>.&lt;/li>
&lt;/ul>
&lt;p>The matchers are evaluated in an OR fashion, i.e. the identity is deemed to be
verified if any one matcher successfully matches against the identity.&lt;/p>
&lt;p>Example of verifying HelmCharts signed by the
&lt;a href="https://github.com/sigstore/cosign-installer" target="_blank">Cosign GitHub Action&lt;/a> with GitHub OIDC 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-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>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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">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">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">reconcileStrategy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ChartVersion&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">version&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;gt;=6.1.6&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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>cosign&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">matchOIDCIdentity&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">issuer&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;^https://token.actions.githubusercontent.com$&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">subject&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;^https://github.com/stefanprodan/podinfo.*$&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&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">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>1m0s&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>oci://ghcr.io/stefanprodan/charts&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;oci&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The controller verifies the signatures using the Fulcio root CA and the Rekor
instance hosted at
&lt;a href="https://rekor.sigstore.dev/" target="_blank">rekor.sigstore.dev&lt;/a>.&lt;/p>
&lt;p>Note that keyless verification is an &lt;strong>experimental feature&lt;/strong>, using
custom root CAs or self-hosted Rekor instances are not currently supported.&lt;/p>
&lt;h4 id="notation">Notation&lt;/h4>
&lt;p>The &lt;code>notation&lt;/code> provider can be used to verify the signature of an OCI artifact using known
trust policy and CA certificate.&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">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">verify&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">provider&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>notation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>notation-config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the verification succeeds, the controller adds a Condition with the
following attributes to the HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>To verify the authenticity of an OCI artifact, create a Kubernetes secret
containing Certificate Authority (CA) root certificates and the a &lt;code>trust policy&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>notation-config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Opaque&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#062873;font-weight:bold">certificate1.pem&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">certificate2.crt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&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">trustpolicy.json&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;BASE64&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that the CA certificates must have either &lt;code>.pem&lt;/code> or &lt;code>.crt&lt;/code> extension and your trust policy must
be named &lt;code>trustpolicy.json&lt;/code> for Flux to make use of them.&lt;/p>
&lt;p>For more information on the signing and verification process see
&lt;a href="https://github.com/notaryproject/specifications/blob/v1.0.0/specs/signing-and-verification-workflow.md" target="_blank">Signing and Verification Workflow&lt;/a>.&lt;/p>
&lt;p>Flux will loop over the certificates and use them to verify an artifact&amp;rsquo;s signature.
This allows for older artifacts to be valid as long as the right certificate is in the secret.&lt;/p>
&lt;h2 id="working-with-helmcharts">Working with HelmCharts&lt;/h2>
&lt;h3 id="triggering-a-reconcile">Triggering a reconcile&lt;/h3>
&lt;p>To manually tell the source-controller to reconcile a HelmChart outside the
&lt;a href="#interval">specified interval window&lt;/a>, a HelmCHart can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the object for reconciliation if the &lt;code>&amp;lt;arbitrary-value&amp;gt;&lt;/code> differs from
the last value the controller acted on, as reported in
&lt;a href="#last-handled-reconcile-at">&lt;code>.status.lastHandledReconcileAt&lt;/code>&lt;/a>.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 annotate --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply --overwrite helmchart/&amp;lt;chart-name&amp;gt; reconcile.fluxcd.io/requestedAt&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#007020;font-weight:bold">$(&lt;/span>date +%s&lt;span style="color:#007020;font-weight:bold">)&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="waiting-for-ready">Waiting for &lt;code>Ready&lt;/code>&lt;/h3>
&lt;p>When a change is applied, it is possible to wait for the HelmChart to reach a
&lt;a href="#ready-helmchart">ready state&lt;/a> using &lt;code>kubectl&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 &lt;span style="color:#007020">wait&lt;/span> helmchart/&amp;lt;chart-name&amp;gt; --for&lt;span style="color:#666">=&lt;/span>&lt;span style="color:#bb60d5">condition&lt;/span>&lt;span style="color:#666">=&lt;/span>ready --timeout&lt;span style="color:#666">=&lt;/span>1m
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="suspending-and-resuming">Suspending and resuming&lt;/h3>
&lt;p>When you find yourself in a situation where you temporarily want to pause the
reconciliation of a HelmChart, you can suspend it using the
&lt;a href="#suspend">&lt;code>.spec.suspend&lt;/code> field&lt;/a>.&lt;/p>
&lt;h4 id="suspend-a-helmchart">Suspend a HelmChart&lt;/h4>
&lt;p>In your YAML declaration:&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;chart-name&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">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">suspend&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>Using &lt;code>kubectl&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 patch helmchart &amp;lt;chart-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34;: {\&amp;#34;suspend\&amp;#34; : true }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> When a HelmChart has an Artifact and is suspended, and this
Artifact later disappears from the storage due to e.g. the source-controller
Pod being evicted from a Node, this will not be reflected in the
HelmChart&amp;rsquo;s Status until it is resumed.&lt;/p>
&lt;h4 id="resume-a-helmchart">Resume a HelmChart&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the field:&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;chart-name&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">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"># suspend: true&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note:&lt;/strong> Setting the field value to &lt;code>false&lt;/code> has the same effect as removing
it, but does not allow for &amp;ldquo;hot patching&amp;rdquo; using e.g. &lt;code>kubectl&lt;/code> while practicing
GitOps; as the manually applied patch would be overwritten by the declared
state in Git.&lt;/p>
&lt;p>Using &lt;code>kubectl&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 patch helmchart &amp;lt;chart-name&amp;gt; --field-manager&lt;span style="color:#666">=&lt;/span>flux-client-side-apply -p &lt;span style="color:#4070a0">&amp;#39;{\&amp;#34;spec\&amp;#34; : {\&amp;#34;suspend\&amp;#34; : false }}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-a-helmchart">Debugging a HelmChart&lt;/h3>
&lt;p>There are several ways to gather information about a HelmChart for debugging
purposes.&lt;/p>
&lt;h4 id="describe-the-helmchart">Describe the HelmChart&lt;/h4>
&lt;p>Describing a HelmChart using &lt;code>kubectl describe helmchart &amp;lt;chart-name&amp;gt;&lt;/code> displays
the latest recorded information for the resource in the &lt;code>Status&lt;/code> and &lt;code>Events&lt;/code>
sections:&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Status:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-13T14:06:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: invalid chart reference: failed to get chart version for remote reference: no &amp;#39;podinfo&amp;#39; chart with version matching &amp;#39;9.*&amp;#39; found
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: InvalidChartReference
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Stalled
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-13T14:06:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: invalid chart reference: failed to get chart version for remote reference: no &amp;#39;podinfo&amp;#39; chart with version matching &amp;#39;9.*&amp;#39; found
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: InvalidChartReference
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: False
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: Ready
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2022-02-13T14:06:27Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: invalid chart reference: failed to get chart version for remote reference: no &amp;#39;podinfo&amp;#39; chart with version matching &amp;#39;9.*&amp;#39; found
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Reason: InvalidChartReference
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Status: True
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type: FetchFailed
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Handled Reconcile At: 1644759954
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Chart Name: podinfo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> URL: http://source-controller.flux-system.svc.cluster.local./helmchart/default/podinfo/latest.tar.gz
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">Events:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Type Reason Age From Message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> ---- ------ ---- ---- -------
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning InvalidChartReference 11s source-controller invalid chart reference: failed to get chart version for remote reference: no &amp;#39;podinfo&amp;#39; chart with ver
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">sion matching &amp;#39;9.*&amp;#39; found
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="trace-emitted-events">Trace emitted Events&lt;/h4>
&lt;p>To view events for specific HelmChart(s), &lt;code>kubectl events&lt;/code> can be used in
combination with &lt;code>--for&lt;/code> to list the Events for specific objects. For example,
running&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 events --for HelmChart/&amp;lt;chart-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>lists&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-console" data-lang="console">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">LAST SEEN TYPE REASON OBJECT MESSAGE
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">22s Warning InvalidChartReference helmchart/&amp;lt;chart-name&amp;gt; invalid chart reference: failed to get chart version for remote reference: no &amp;#39;podinfo&amp;#39; chart with version matching &amp;#39;9.*&amp;#39; found
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2s Normal ChartPullSucceeded helmchart/&amp;lt;chart-name&amp;gt; pulled &amp;#39;podinfo&amp;#39; chart with version &amp;#39;6.0.3&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2s Normal ArtifactUpToDate helmchart/&amp;lt;chart-name&amp;gt; artifact up-to-date with remote revision: &amp;#39;6.0.3&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Besides being reported in Events, the reconciliation errors are also logged by
the controller. The Flux CLI offer commands for filtering the logs for a
specific HelmChart, e.g. &lt;code>flux logs --level=error --kind=HelmChart --name=&amp;lt;chart-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h3 id="improving-resource-consumption-by-enabling-the-cache">Improving resource consumption by enabling the cache&lt;/h3>
&lt;p>When using a &lt;code>HelmRepository&lt;/code> as Source for a &lt;code>HelmChart&lt;/code>, the controller loads
the repository index in memory to find the latest version of the chart.&lt;/p>
&lt;p>The controller can be configured to cache Helm repository indexes in memory.
The cache is used to avoid loading repository indexes for every &lt;code>HelmChart&lt;/code>
reconciliation.&lt;/p>
&lt;p>The following flags are provided to enable and configure the cache:&lt;/p>
&lt;ul>
&lt;li>&lt;code>helm-cache-max-size&lt;/code>: The maximum size of the cache in number of indexes.
If &lt;code>0&lt;/code>, then the cache is disabled.&lt;/li>
&lt;li>&lt;code>helm-cache-ttl&lt;/code>: The TTL of an index in the cache.&lt;/li>
&lt;li>&lt;code>helm-cache-purge-interval&lt;/code>: The interval at which the cache is purged of
expired items.&lt;/li>
&lt;/ul>
&lt;p>The caching strategy is to pull a repository index from the cache if it is
available, otherwise to load the index, retrieve and build the chart,
then cache the index. The cached index TTL is refreshed every time the
Helm repository index is loaded with the &lt;code>helm-cache-ttl&lt;/code> value.&lt;/p>
&lt;p>The cache is purged of expired items every &lt;code>helm-cache-purge-interval&lt;/code>.&lt;/p>
&lt;p>When the cache is full, no more items can be added to the cache, and the
source-controller will report a warning event instead.&lt;/p>
&lt;p>In order to use the cache, set the related flags in the source-controller
Deployment config:&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">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">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>- --watch-all-namespaces&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --log-level=info&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --log-encoding=json&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --enable-leader-election&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --storage-path=/data&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc.cluster.local.&lt;span style="color:#bbb">
&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">## Helm cache with up to 10 items, i.e. 10 indexes.&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --helm-cache-max-size=10&lt;span style="color:#bbb">
&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">## TTL of an index is 1 hour.&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --helm-cache-ttl=1h&lt;span style="color:#bbb">
&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">## Purge expired index every 10 minutes.&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- --helm-cache-purge-interval=10m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="helmchart-status">HelmChart Status&lt;/h2>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The HelmChart reports the last built chart as an Artifact object in the
&lt;code>.status.artifact&lt;/code> of the resource.&lt;/p>
&lt;p>The Artifact file is a gzip compressed TAR archive (&lt;code>&amp;lt;chart-name&amp;gt;-&amp;lt;chart-version&amp;gt;.tgz&lt;/code>),
and can be retrieved in-cluster from the &lt;code>.status.artifact.url&lt;/code> HTTP address.&lt;/p>
&lt;h4 id="artifact-example">Artifact example&lt;/h4>
&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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;chart-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:e30b95a08787de69ffdad3c232d65cfb131b5b50c6fd44295f48a078fceaa44e&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2022-02-10T18:53:47Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-&amp;lt;chart-version&amp;gt;.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">6.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">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">14166&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.flux-system.svc.cluster.local./helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-&amp;lt;chart-version&amp;gt;.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When using a &lt;code>HelmRepository&lt;/code> as the source reference and values files are
provided, the value of &lt;code>status.artifact.revision&lt;/code> is the chart version combined
with the &lt;code>HelmChart&lt;/code> object generation. For example, if the chart version is
&lt;code>6.0.3&lt;/code> and the &lt;code>HelmChart&lt;/code> object generation is &lt;code>1&lt;/code>, the
&lt;code>status.artifact.revision&lt;/code> value will be &lt;code>6.0.3+1&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>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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;chart-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:ee68224ded207ebb18a8e9730cf3313fa6bc1f31e6d8d3943ab541113559bb52&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2022-02-28T08:07:12Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-6.0.3+1.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">6.0.3+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">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">14166&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.flux-system.svc.cluster.local./helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-6.0.3+1.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">observedGeneration&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:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When using a &lt;code>GitRepository&lt;/code> or a &lt;code>Bucket&lt;/code> as the source reference and
&lt;code>Revision&lt;/code> as the reconcile strategy, the value of &lt;code>status.artifact.revision&lt;/code> is
the chart version combined with the first 12 characters of the revision of the
&lt;code>GitRepository&lt;/code> or &lt;code>Bucket&lt;/code>. For example if the chart version is &lt;code>6.0.3&lt;/code> and the
revision of the &lt;code>Bucket&lt;/code> is &lt;code>4e5cbb7b97d00a8039b8810b90b922f4256fd3bd8f78b934b4892dae13f7ca87&lt;/code>,
the &lt;code>status.artifact.revision&lt;/code> value will be &lt;code>6.0.3+4e5cbb7b97d0&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>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>HelmChart&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;chart-name&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">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:8d1f0ac3f4b0e8759a32180086f17ac87ca04e5d46c356e67f97e97616ef4718&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2022-02-28T08:07:12Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-6.0.3+4e5cbb7b97d0.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">6.0.3&lt;/span>+4e5cbb7b97d0&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">14166&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://source-controller.flux-system.svc.cluster.local./helmchart/&amp;lt;source-namespace&amp;gt;/&amp;lt;chart-name&amp;gt;/&amp;lt;chart-name&amp;gt;-6.0.3+4e5cbb7b97d0.tgz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>A HelmChart enters various states during its lifecycle, reflected as
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">Kubernetes
Conditions&lt;/a>.
It can be
&lt;a href="#reconciling-helmchart">reconciling&lt;/a> while fetching or building the
chart, it can be
&lt;a href="#ready-helmchart">ready&lt;/a>, it can
&lt;a href="#failed-helmchart">fail during reconciliation&lt;/a>, or it can
&lt;a href="#stalled-helmchart">stall&lt;/a>.&lt;/p>
&lt;p>The HelmChart API is compatible with the
&lt;a href="https://github.com/kubernetes-sigs/cli-utils/tree/master/pkg/kstatus" target="_blank">kstatus
specification&lt;/a>,
and reports &lt;code>Reconciling&lt;/code> and &lt;code>Stalled&lt;/code> conditions where applicable to
provide better (timeout) support to solutions polling the HelmChart to become
&lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-helmchart">Reconciling HelmChart&lt;/h4>
&lt;p>The source-controller marks a HelmChart as &lt;em>reconciling&lt;/em> when one of the
following is true:&lt;/p>
&lt;ul>
&lt;li>There is no current Artifact for the HelmChart, or the reported Artifact is
determined to have disappeared from the storage.&lt;/li>
&lt;li>The generation of the HelmChart is newer than the
&lt;a href="#observed-generation">Observed
Generation&lt;/a>.&lt;/li>
&lt;li>The newly fetched Artifact revision differs from the current Artifact.&lt;/li>
&lt;/ul>
&lt;p>When the HelmChart is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status becomes
&lt;code>Unknown&lt;/code> when the controller detects drift, and the controller adds a Condition
with the following attributes to the HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code> | &lt;code>reason: ProgressingWithRetry&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>If the reconciling state is due to a new version, it adds an additional
Condition with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactOutdated&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: NewChart&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Both Conditions have a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and are only present on the HelmChart while their status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-helmchart">Ready HelmChart&lt;/h4>
&lt;p>The source-controller marks a HelmChart as &lt;em>ready&lt;/em> when it has the following
characteristics:&lt;/p>
&lt;ul>
&lt;li>The HelmChart reports an
&lt;a href="#artifact">Artifact&lt;/a>.&lt;/li>
&lt;li>The reported Artifact exists in the controller&amp;rsquo;s Artifact storage.&lt;/li>
&lt;li>The controller was able to fetch and build the Helm chart using the current
spec.&lt;/li>
&lt;li>The version/revision of the reported Artifact is up-to-date with the
latest version/revision of the Helm chart.&lt;/li>
&lt;/ul>
&lt;p>When the HelmChart is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the
following attributes in the HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the
HelmChart is marked as
&lt;a href="#reconciling-helmchart">reconciling&lt;/a>, or e.g.
a
&lt;a href="#failed-helmchart">transient error&lt;/a> occurs due to a temporary network issue.&lt;/p>
&lt;p>When the HelmChart Artifact is archived in the controller&amp;rsquo;s Artifact
storage, the controller sets a Condition with the following attributes in the
HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: ArtifactInStorage&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>ArtifactInStorage&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until
the Artifact in the storage no longer exists.&lt;/p>
&lt;h4 id="failed-helmchart">Failed HelmChart&lt;/h4>
&lt;p>The source-controller may get stuck trying to produce an Artifact for a
HelmChart without completing. This can occur due to some of the following
factors:&lt;/p>
&lt;ul>
&lt;li>The Helm chart Source is temporarily unavailable.&lt;/li>
&lt;li>The credentials in the
&lt;a href="#source-reference">Source reference&lt;/a> Secret are
invalid.&lt;/li>
&lt;li>The HelmChart spec contains a generic misconfiguration.&lt;/li>
&lt;li>A storage related failure when storing the artifact.&lt;/li>
&lt;/ul>
&lt;p>When this happens, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
and adds a Condition with the following attributes to the HelmChart&amp;rsquo;s
&lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: FetchFailed&lt;/code> | &lt;code>type: StorageOperationFailed&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AuthenticationFailed&lt;/code> | &lt;code>reason: StorageOperationFailed&lt;/code> | &lt;code>reason: URLInvalid&lt;/code> | &lt;code>reason: IllegalPath&lt;/code> | &lt;code>reason: Failed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This condition has a
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">&amp;ldquo;negative polarity&amp;rdquo;&lt;/a>,
and is only present on the HelmChart while the status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.
There may be more arbitrary values for the &lt;code>reason&lt;/code> field to provide accurate
reason for a condition.&lt;/p>
&lt;p>While the HelmChart has this Condition, the controller will continue to
attempt to produce an Artifact for the resource with an exponential backoff,
until it succeeds and the HelmChart is marked as
&lt;a href="#ready-helmchart">ready&lt;/a>.&lt;/p>
&lt;p>Note that a HelmChart can be
&lt;a href="#reconciling-helmchart">reconciling&lt;/a>
while failing at the same time, for example due to a newly introduced
configuration issue in the HelmChart spec. When a reconciliation fails, the
&lt;code>Reconciling&lt;/code> Condition reason would be &lt;code>ProgressingWithRetry&lt;/code>. When the
reconciliation is performed again after the failure, the reason is updated to
&lt;code>Progressing&lt;/code>.&lt;/p>
&lt;h4 id="stalled-helmchart">Stalled HelmChart&lt;/h4>
&lt;p>The source-controller can mark a HelmChart as &lt;em>stalled&lt;/em> when it determines that
without changes to the spec, the reconciliation can not succeed.
For example because a HelmChart Version is set to a non-existing version.&lt;/p>
&lt;p>When this happens, the controller sets the same Conditions as when it
&lt;a href="#failed-helmchart">fails&lt;/a>, but adds another Condition with the following
attributes to the HelmChart&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Stalled&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: InvalidChartReference&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>While the HelmChart has this Condition, the controller will not requeue the
resource any further, and will stop reconciling the resource until a change to
the spec is made.&lt;/p>
&lt;h3 id="observed-source-artifact-revision">Observed Source Artifact Revision&lt;/h3>
&lt;p>The source-controller reports the revision of the last
&lt;a href="#source-reference">Source reference&amp;rsquo;s&lt;/a> Artifact the current chart was fetched
from in the HelmChart&amp;rsquo;s &lt;code>.status.observedSourceArtifactRevision&lt;/code>. It is used to
keep track of the source artifact revision and detect when a new source
artifact is available.&lt;/p>
&lt;h3 id="observed-chart-name">Observed Chart Name&lt;/h3>
&lt;p>The source-controller reports the last resolved chart name of the Artifact
for the
&lt;a href="#chart">&lt;code>.spec.chart&lt;/code> field&lt;/a> in the HelmChart&amp;rsquo;s
&lt;code>.status.observedChartName&lt;/code>. It is used to keep track of the chart and detect
when a new chart is found.&lt;/p>
&lt;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The source-controller reports an
&lt;a href="https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties" target="_blank">observed generation&lt;/a>
in the HelmChart&amp;rsquo;s &lt;code>.status.observedGeneration&lt;/code>. The observed generation is the
latest &lt;code>.metadata.generation&lt;/code> which resulted in either a
&lt;a href="#ready-helmchart">ready state&lt;/a>,
or stalled due to error it can not recover from without human
intervention.&lt;/p>
&lt;h3 id="last-handled-reconcile-at">Last Handled Reconcile At&lt;/h3>
&lt;p>The source-controller reports the last &lt;code>reconcile.fluxcd.io/requestedAt&lt;/code>
annotation value it acted on in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;p>For practical information about this field, see
&lt;a href="#triggering-a-reconcile">triggering a
reconcile&lt;/a>.&lt;/p></description></item><item><title>Flux: External Artifacts</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/externalartifacts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/externalartifacts/</guid><description>
&lt;p>The &lt;code>ExternalArtifact&lt;/code> is a generic API designed for interoperability with Flux.
It allows 3rd party controllers to produce and store
&lt;a href="#artifact">Artifact&lt;/a> objects
in the same way as Flux&amp;rsquo;s own source-controller.
For more details on the design and motivation behind this API,
see
&lt;a href="https://github.com/fluxcd/flux2/tree/main/rfcs/0012-external-artifact" target="_blank">RFC-0012&lt;/a>.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of a ExternalArtifact produced by a 3rd party
source controller:&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>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>ExternalArtifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-artifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">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">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>example.com/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>Source&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-source&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">status&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifact&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:35d47c9db0eee6ffe08a404dfb416bee31b2b79eabc3f2eb26749163ce487f52&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">lastUpdateTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2025-08-21T13:37:31Z&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">path&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>source/flux-system/my-source/35d47c9d.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>v1.0.0@sha256:35d47c9db0eee6ffe08a404dfb416bee31b2b79eabc3f2eb26749163ce487f52&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">size&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">20914&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>http://example-controller.flux-system.svc.cluster.local./source/flux-system/my-source/35d47c9d.tar.gz&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">conditions&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">lastTransitionTime&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;2025-08-21T13:37:31Z&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">message&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>stored artifact for revision v1.0.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">observedGeneration&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">reason&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Succeeded&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">status&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">type&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Ready&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="externalartifact-spec">ExternalArtifact spec&lt;/h2>
&lt;h3 id="source-reference">Source reference&lt;/h3>
&lt;p>The &lt;code>spec.sourceRef&lt;/code> field is optional and contains a reference
to the custom resource that the ExternalArtifact is based on.&lt;/p>
&lt;p>The &lt;code>spec.sourceRef&lt;/code> contains the following fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>apiVersion&lt;/code>: the API version of the custom resource.&lt;/li>
&lt;li>&lt;code>kind&lt;/code>: the kind of the custom resource.&lt;/li>
&lt;li>&lt;code>name&lt;/code>: the name of the custom resource.&lt;/li>
&lt;li>&lt;code>namespace&lt;/code>: the namespace of the custom resource. If omitted, it defaults to the
namespace of the ExternalArtifact.&lt;/li>
&lt;/ul>
&lt;h2 id="externalartifact-status">ExternalArtifact status&lt;/h2>
&lt;h3 id="artifact">Artifact&lt;/h3>
&lt;p>The ExternalArtifact reports the latest synchronized state
as an Artifact object in the &lt;code>.status.artifact&lt;/code>.&lt;/p>
&lt;p>The &lt;code>.status.artifact&lt;/code> contains the following fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>digest&lt;/code>: The checksum of the tar.gz file in the format &lt;code>&amp;lt;algorithm&amp;gt;:&amp;lt;checksum&amp;gt;&lt;/code>.&lt;/li>
&lt;li>&lt;code>lastUpdateTime&lt;/code>: Timestamp of the last artifact update.&lt;/li>
&lt;li>&lt;code>path&lt;/code>: Relative file path of the artifact in storage.&lt;/li>
&lt;li>&lt;code>revision&lt;/code>: Human-readable identifier with version and checksum in the format &lt;code>&amp;lt;human-readable-identifier&amp;gt;@&amp;lt;algorithm&amp;gt;:&amp;lt;checksum&amp;gt;&lt;/code>.&lt;/li>
&lt;li>&lt;code>size&lt;/code>: Number of bytes in the tar.gz file.&lt;/li>
&lt;li>&lt;code>url&lt;/code>: In-cluster HTTP address for artifact retrieval.&lt;/li>
&lt;/ul>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>The ExternalArtifact reports its status using Kubernetes standard conditions.&lt;/p>
&lt;h4 id="ready-externalartifact">Ready ExternalArtifact&lt;/h4>
&lt;p>When the 3rd party controller has successfully produced and stored an
Artifact in storage, it sets a Condition with the following
attributes in the ExternalArtifact&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>message&lt;/code> field should contain a human-readable message indicating
the successful storage of the artifact and the associated revision.&lt;/p>
&lt;p>If the 3rd party controller performs a signature verification
of the artifact, and the verification is successful, a Condition with the
following attributes is added to the ExternalArtifact&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: SourceVerified&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>message&lt;/code> field should contain a human-readable message indicating
the successful verification of the artifact and the associated verification method.&lt;/p>
&lt;h4 id="failed-externalartifact">Failed ExternalArtifact&lt;/h4>
&lt;p>If the 3rd party controller fails to produce and store an Artifact,
it sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>, and adds a Condition with
the following attributes to the ExternalArtifact&amp;rsquo;s &lt;code>.status.conditions&lt;/code>:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;False&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: FetchFailed&lt;/code> | &lt;code>reason: StorageOperationFailed&lt;/code> | &lt;code>reason: VerificationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>The &lt;code>message&lt;/code> field should contain a human-readable message indicating
the reason for the failure.&lt;/p></description></item><item><title>Flux: Artifact Generators</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/artifactgenerators/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/artifactgenerators/</guid><description>
&lt;p>The ArtifactGenerator is an extension of Flux APIs that allows source composition and decomposition.
It enables the generation of
&lt;a href="https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/externalartifacts.md" target="_blank">ExternalArtifacts&lt;/a> from multiple sources
(
&lt;a href="https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/gitrepositories.md" target="_blank">GitRepositories&lt;/a>,
&lt;a href="https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/ocirepositories.md" target="_blank">OCIRepositories&lt;/a> and
&lt;a href="https://github.com/fluxcd/source-controller/blob/main/docs/spec/v1/buckets.md" target="_blank">Buckets&lt;/a>)
or the splitting of a single source into multiple artifacts.&lt;/p>
&lt;h2 id="source-composition-example">Source Composition Example&lt;/h2>
&lt;p>The following example shows how to compose an artifact from multiple sources:&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>source.extensions.fluxcd.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ArtifactGenerator&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">sources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-configs&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifacts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-app-composite&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">copy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@backend/deploy/**&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/my-app/backend/&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">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@frontend/deploy/*.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/my-app/frontend/&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">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@config/envs/prod/configmap.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/my-app/env.yaml&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above generator will create an ExternalArtifact named &lt;code>my-app-composite&lt;/code>
in the &lt;code>apps&lt;/code> namespace, which contains the deployment manifests from both
the &lt;code>my-backend&lt;/code> Git repository and the &lt;code>my-frontend&lt;/code> OCI repository,
as well as a ConfigMap from the &lt;code>my-configs&lt;/code> Bucket.&lt;/p>
&lt;p>The ExternalArtifact revision is computed based on the final content of the artifact,
in the format &lt;code>latest@sha256:&amp;lt;hash&amp;gt;&lt;/code>, where &lt;code>&amp;lt;hash&amp;gt;&lt;/code> is a SHA256 checksum of the combined files.&lt;/p>
&lt;p>The generated ExternalArtifact can be deployed using a Flux Kustomization, 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:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>kustomize.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>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">targetNamespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ExternalArtifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-composite&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&lt;span style="color:#4070a0">&amp;#34;./my-app&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">prune&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>Every time one of the sources is updated, a new artifact revision will be generated
with the latest content and the Flux Kustomization will automatically reconcile it.&lt;/p>
&lt;h2 id="helm-chart-composition-example">Helm Chart Composition Example&lt;/h2>
&lt;p>The following example shows how to compose a Helm chart from multiple sources:&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>source.extensions.fluxcd.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ArtifactGenerator&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">sources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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:#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>podinfo-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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifacts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo-composite&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">originRevision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@chart&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">copy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@chart/&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/&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">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@repo/charts/podinfo/values-prod.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/podinfo/values.yaml&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">strategy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Merge&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Or `Overwrite` to replace the values.yaml&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above generator will create an ExternalArtifact named &lt;code>podinfo-composite&lt;/code> in the &lt;code>apps&lt;/code> namespace,
which contains the Helm chart from the &lt;code>podinfo-chart&lt;/code> OCI repository with the &lt;code>values.yaml&lt;/code> merged with
&lt;code>values-prod.yaml&lt;/code> from the Git repository.&lt;/p>
&lt;p>The generated ExternalArtifact can be deployed using a Flux HelmRelease, 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:#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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">releaseName&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">chartRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ExternalArtifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-composite&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="source-decomposition-example">Source Decomposition Example&lt;/h2>
&lt;p>The following example shows how to decompose a source into multiple artifacts:&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>source.extensions.fluxcd.io/v1beta1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ArtifactGenerator&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">sources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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:#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-monorepo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">artifacts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">originRevision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@repo&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">copy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@repo/deploy/frontend/**&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/&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">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">originRevision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@repo&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">copy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@repo/deploy/backend/**&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above generator will create two ExternalArtifacts named &lt;code>frontend&lt;/code> and &lt;code>backend&lt;/code>
in the &lt;code>apps&lt;/code> namespace, each containing the respective deployment manifests
from the &lt;code>my-monorepo&lt;/code> Git repository.&lt;/p>
&lt;p>The generated ExternalArtifacts can be deployed using Flux Kustomizations, 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:#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>kustomize.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>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ExternalArtifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&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">prune&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:#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>kustomize.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>Kustomization&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>apps&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ExternalArtifact&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&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">prune&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>Every time the monorepo is updated, new revisions will be generated only for the affected artifacts.
If the manifests in &lt;code>deploy/frontend/&lt;/code> directory are modified, only the &lt;code>frontend&lt;/code> artifact will
receive a new revision, triggering the Flux Kustomization that applies it.
While the &lt;code>backend&lt;/code> artifact remains unchanged and its Kustomization will not reconcile.&lt;/p>
&lt;h2 id="writing-an-artifactgenerator">Writing an ArtifactGenerator&lt;/h2>
&lt;p>As with all other Kubernetes config, an ArtifactGenerator needs &lt;code>apiVersion&lt;/code>,&lt;code>kind&lt;/code>,
&lt;code>metadata.name&lt;/code> and &lt;code>metadata.namespace&lt;/code> fields.&lt;/p>
&lt;p>The &lt;code>spec&lt;/code> field defines the desired state of the ArtifactGenerator, while the &lt;code>status&lt;/code>
field reports the latest observed state.&lt;/p>
&lt;h3 id="sources">Sources&lt;/h3>
&lt;p>The &lt;code>.spec.sources&lt;/code> field defines the Flux source-controller resources that will be used as inputs
for artifact generation. Each source must specify:&lt;/p>
&lt;ul>
&lt;li>&lt;code>alias&lt;/code>: A unique identifier used to reference the source in copy operations.
Alias names must be unique within the same ArtifactGenerator and can only contain
alphanumeric characters, dashes and underscores.&lt;/li>
&lt;li>&lt;code>kind&lt;/code>: The type of Flux source resource (&lt;code>GitRepository&lt;/code>, &lt;code>OCIRepository&lt;/code>, or &lt;code>Bucket&lt;/code>)&lt;/li>
&lt;li>&lt;code>name&lt;/code>: The name of the source resource&lt;/li>
&lt;li>&lt;code>namespace&lt;/code> (optional): The namespace of the source resource if different from the ArtifactGenerator namespace&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Note&lt;/strong> that on multi-tenant clusters, platform admins can disable cross-namespace references
by starting the controller with the &lt;code>--no-cross-namespace-refs=true&lt;/code> flag.&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">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">sources&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-backend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>OCIRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-frontend&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">alias&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>config&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Bucket&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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-configs&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Sources are watched for changes, and when any source is updated, the controller will
regenerate the affected artifacts automatically.&lt;/p>
&lt;h3 id="artifacts">Artifacts&lt;/h3>
&lt;p>The &lt;code>.spec.artifacts&lt;/code> field defines the list of ExternalArtifacts to be generated from the sources.
Each artifact must specify:&lt;/p>
&lt;ul>
&lt;li>&lt;code>name&lt;/code> (required): The name of the generated ExternalArtifact resource. It must be unique in the context
of the ArtifactGenerator and must conform to Kubernetes resource naming conventions.&lt;/li>
&lt;li>&lt;code>copy&lt;/code> (required): A list of copy operations to perform from sources to the artifact.&lt;/li>
&lt;li>&lt;code>revision&lt;/code> (optional): A specific source revision to use in the format &lt;code>@alias&lt;/code>.
If not specified, the revision is automatically computed as &lt;code>latest@&amp;lt;digest&amp;gt;&lt;/code> based on the artifact content.&lt;/li>
&lt;li>&lt;code>originRevision&lt;/code> (optional): A specific source origin revision to include in the artifact metadata
in the format &lt;code>@alias&lt;/code>. This is useful for the decomposition use case, where you want to track
the original source revision of the artifact (e.g. the monorepo commit SHA) without affecting
the artifact revision itself.&lt;/li>
&lt;/ul>
&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">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">artifacts&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">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">revision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@backend&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">originRevision&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@frontend&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">copy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@backend/deploy/**&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/backend/&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">exclude&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>[&lt;span style="color:#4070a0">&amp;#34;**/charts/**&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">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@frontend/manifests/*.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/frontend/&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">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@config/envs/prod/configmap.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/env.yaml&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="copy-operations">Copy Operations&lt;/h4>
&lt;p>Each copy operation specifies how to copy files from sources into the generated artifact:&lt;/p>
&lt;ul>
&lt;li>&lt;code>from&lt;/code>: Source path in the format &lt;code>@alias/pattern&lt;/code> where &lt;code>alias&lt;/code> references
a source and &lt;code>pattern&lt;/code> is a glob pattern or a specific file/directory path within that source.&lt;/li>
&lt;li>&lt;code>to&lt;/code>: Destination path in the format &lt;code>@artifact/path&lt;/code> where &lt;code>artifact&lt;/code> is
the root of the generated artifact and &lt;code>path&lt;/code> is the relative path to a file or directory.&lt;/li>
&lt;li>&lt;code>exclude&lt;/code> (optional): A list of glob patterns to filter out from the source selection.
Any file matched by &lt;code>from&lt;/code> that also matches an exclude pattern will be ignored.&lt;/li>
&lt;li>&lt;code>strategy&lt;/code> (optional): Defines how to handle existing files at the destination,
either &lt;code>Overwrite&lt;/code> (default) or &lt;code>Merge&lt;/code> (for YAML files only).&lt;/li>
&lt;/ul>
&lt;p>Copy operations use &lt;code>cp&lt;/code>-like semantics:&lt;/p>
&lt;ul>
&lt;li>Operations are executed in order; later operations can overwrite files from earlier ones&lt;/li>
&lt;li>Trailing slash in destination (&lt;code>@artifact/dest/&lt;/code>) indicates copying into a directory&lt;/li>
&lt;li>&lt;code>@source/dir/&lt;/code> copies as subdirectory, &lt;code>@source/dir/**&lt;/code> strips directory prefix and copies contents recursively&lt;/li>
&lt;/ul>
&lt;p>Examples of copy 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-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic"># Copy file to specific path - (like `cp source/config.yaml artifact/apps/app.yaml`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@source/config.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/apps/app.yaml&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Creates apps/app.yaml file&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">
&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"># Copy file to directory - (like `cp source/config.yaml artifact/apps/`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@source/config.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/apps/&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Creates apps/config.yaml&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Copy files to directory - (like `cp source/configs/*.yaml artifact/apps/`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@source/configs/*.yaml&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># All .yaml files in configs/&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/apps/&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Creates apps/file1.yaml, apps/file2.yaml&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Copy dir and files recursively - (like `cp -r source/configs/ artifact/apps/`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@source/configs/&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># All files and sub-dirs under configs/ &lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/apps/&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Creates apps/configs/ with contents&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">
&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"># Copy files and dirs recursively - (like `cp -r source/configs/** artifact/apps/`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@source/configs/**&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># All files and sub-dirs under configs/ &lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/apps/&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Creates apps/file1.yaml, apps/subdir/file2.yaml&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">exclude&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#4070a0">&amp;#34;*.md&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Excludes all .md files&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#4070a0">&amp;#34;**/testdata/**&amp;#34;&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># Excludes all files under any testdata/ dir&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="copy-strategies">Copy Strategies&lt;/h4>
&lt;p>By default, copy operations use the &lt;code>Overwrite&lt;/code> strategy, where later copies
overwrite files from earlier ones.&lt;/p>
&lt;p>When copying YAML files, the &lt;code>Merge&lt;/code> strategy can be used to merge the contents
from the source file into the destination file.&lt;/p>
&lt;p>Example of copy with &lt;code>Merge&lt;/code> strategy:&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"># Copy the chart contents (this includes chart-name/values.yaml)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@chart/&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/&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"># Merge values.yaml files - (like `helm --values values-prod.yaml`)&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>- &lt;span style="color:#062873;font-weight:bold">from&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@git/values-prod.yaml&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">to&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;@artifact/chart-name/values.yaml&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">strategy&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Merge&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>Note&lt;/strong> that the merge strategy will replace &lt;em>arrays&lt;/em> entirely, the behavior is
identical to how Helm merges &lt;code>values.yaml&lt;/code> files when using multiple &lt;code>--values&lt;/code> flags.&lt;/p>
&lt;h2 id="working-with-artifactgenerators">Working with ArtifactGenerators&lt;/h2>
&lt;h3 id="suspend-and-resume-reconciliation">Suspend and Resume Reconciliation&lt;/h3>
&lt;p>You can temporarily suspend the reconciliation of an ArtifactGenerator by setting
the following annotation on the 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:#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">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">source.extensions.fluxcd.io/reconcile&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;Disabled&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To resume reconciliation, remove the annotation or set its value to &lt;code>Enabled&lt;/code>.&lt;/p>
&lt;h3 id="trigger-reconciliation">Trigger Reconciliation&lt;/h3>
&lt;p>You can manually trigger a reconciliation of an ArtifactGenerator by adding
the following annotation to the 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:#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">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">reconcile.fluxcd.io/requestedAt&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#34;&amp;lt;timestamp&amp;gt;&amp;#34;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The controller will pick up the annotation and start a reconciliation as soon as possible.
After the reconciliation is complete, the controller sets the timestamp from the annotation
in the &lt;code>.status.lastHandledReconcileAt&lt;/code> field.&lt;/p>
&lt;h2 id="artifactgenerator-status">ArtifactGenerator Status&lt;/h2>
&lt;p>The controller reports the latest synchronized state of an ArtifactGenerator in the &lt;code>.status&lt;/code> field.&lt;/p>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>ArtifactGenerator has various states during its lifecycle, reflected as
Kubernetes Conditions. It can be
&lt;a href="#reconciling-artifactgenerator">reconciling&lt;/a>
while fetching the remote state, it can be
&lt;a href="#ready-artifactgenerator">ready&lt;/a>,
or it can
&lt;a href="#failed-artifactgenerator">fail during reconciliation&lt;/a>.&lt;/p>
&lt;p>All conditions have a &lt;code>message&lt;/code> field that provides additional context about
the current state.&lt;/p>
&lt;h4 id="reconciling-artifactgenerator">Reconciling ArtifactGenerator&lt;/h4>
&lt;p>The controller marks an ArtifactGenerator as &lt;em>reconciling&lt;/em> when
it is actively working to produce artifacts from source changes.&lt;/p>
&lt;p>When the ArtifactGenerator is reconciling, the controller sets
the &lt;code>Reconciling&lt;/code> Condition with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Reconciling&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Progressing&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>In addition, the controller sets the &lt;code>Ready&lt;/code> Condition to &lt;code>Unknown&lt;/code>.&lt;/p>
&lt;h4 id="ready-artifactgenerator">Ready ArtifactGenerator&lt;/h4>
&lt;p>The controller marks an ArtifactGenerator as &lt;em>ready&lt;/em> when it has successfully
produced and stored artifacts in the controller&amp;rsquo;s storage.&lt;/p>
&lt;p>When the ArtifactGenerator is &amp;ldquo;ready&amp;rdquo;, the controller sets
the &lt;code>Ready&lt;/code> Condition with the following attributes:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: Succeeded&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>This &lt;code>Ready&lt;/code> Condition will retain a status value of &lt;code>&amp;quot;True&amp;quot;&lt;/code> until the
ArtifactGenerator is marked as
&lt;a href="#reconciling-artifactgenerator">reconciling&lt;/a>, or an
&lt;a href="#failed-artifactgenerator">error&lt;/a> occurs.&lt;/p>
&lt;h4 id="failed-artifactgenerator">Failed ArtifactGenerator&lt;/h4>
&lt;p>The controller may encounter errors while attempting to produce and store
artifacts. These errors can be transient or terminal, such as:&lt;/p>
&lt;ul>
&lt;li>The Flux source-controller is unreachable (e.g. network issues).&lt;/li>
&lt;li>One of the referenced sources is not found or access is denied.&lt;/li>
&lt;li>The copy operation fails due to duplicate aliases, invalid glob patterns or missing files.&lt;/li>
&lt;li>Encounters a storage related failure when storing the artifacts.&lt;/li>
&lt;/ul>
&lt;p>When an error occurs, the controller sets the &lt;code>Ready&lt;/code> Condition status to &lt;code>False&lt;/code>,
with one of the following reasons:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Ready&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;False&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: BuildFaild | SourceFetchFailed | ReconciliationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Transient errors (e.g. network issues) will cause the controller to
retry the reconciliation after a backoff period, while terminal errors
(e.g. access denied, invalid spec) will cause the controller to
mark the ArtifactGenerator as
&lt;a href="#stalled-artifactgenerator">stalled&lt;/a>.&lt;/p>
&lt;h4 id="stalled-artifactgenerator">Stalled ArtifactGenerator&lt;/h4>
&lt;p>The controller marks an ArtifactGenerator as &lt;em>stalled&lt;/em> when it encounters
a terminal failure that prevents it from making progress.&lt;/p>
&lt;p>When the ArtifactGenerator is stalled, the controller sets the following condition:&lt;/p>
&lt;ul>
&lt;li>&lt;code>type: Stalled&lt;/code>&lt;/li>
&lt;li>&lt;code>status: &amp;quot;True&amp;quot;&lt;/code>&lt;/li>
&lt;li>&lt;code>reason: AccessDenied | ValidationFailed&lt;/code>&lt;/li>
&lt;/ul>
&lt;h3 id="inventory">Inventory&lt;/h3>
&lt;p>The controller reports the list of generated ExternalArtifacts in the&lt;code>.status.inventory&lt;/code>
field of the ArtifactGenerator. The inventory is used by the controller to keep track
of the artifacts in storage and to perform garbage collection of orphaned artifacts.&lt;/p>
&lt;h2 id="artifactgenerator-events">ArtifactGenerator Events&lt;/h2>
&lt;p>The controller emits Kubernetes events to provide insights into the lifecycle
of an ArtifactGenerator. These events can be viewed using &lt;code>kubectl describe&lt;/code>
or with &lt;code>kubectl events&lt;/code>.&lt;/p>
&lt;p>Events are emitted for the following scenarios:&lt;/p>
&lt;ul>
&lt;li>ArtifactGenerator reconciliation completion (success or failure).&lt;/li>
&lt;li>ExternalArtifacts creation, update, or deletion.&lt;/li>
&lt;li>Source fetch failures or access issues.&lt;/li>
&lt;li>Build failures (e.g. invalid glob patterns, missing files).&lt;/li>
&lt;li>Storage operations (e.g. garbage collection, integrity validation failures).&lt;/li>
&lt;li>Drift detection (e.g. manual changes to generated ExternalArtifacts).&lt;/li>
&lt;/ul>
&lt;p>All events are also logged to the controller&amp;rsquo;s standard output and contain
the ArtifactGenerator name and namespace.&lt;/p></description></item><item><title>Flux: API Reference</title><link>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2413--fluxcd.netlify.app/flux/components/source/api/</guid><description/></item></channel></rss>