<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flux – Image reflector and automation controllers</title><link>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/</link><description>Recent content in Image reflector and automation controllers on Flux</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/index.xml" rel="self" type="application/rss+xml"/><item><title>Flux: Controller Options</title><link>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/options/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/options/</guid><description>
&lt;p>To customise the controller options at install time,
please see the
&lt;a href="https://deploy-preview-2713--fluxcd.netlify.app/flux/installation/configuration/bootstrap-customization/">bootstrap customization guide&lt;/a>.&lt;/p>
&lt;h2 id="image-automation-flags">Image automation 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>--authorized-event-server-spiffe-id&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>SPIFFE ID of an event server authorized to receive events from image-automation-controller. Can be repeated. When set, the event recorder uses SPIFFE mTLS.&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 kustomize reconciles. (default 4)&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>--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.&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>--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>--spiffe-broker-endpoint&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The gRPC URL of the SPIFFE Broker endpoint.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--spiffe-broker-id&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>SPIFFE ID of the SPIFFE Broker endpoint. Can be repeated.&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="spiffe-mtls">SPIFFE mTLS&lt;/h3>
&lt;p>When the repeatable flag &lt;code>--authorized-event-server-spiffe-id&lt;/code> is set,
image-automation-controller acquires an X.509-SVID from the SPIFFE Workload API.
The &lt;code>SPIFFE_ENDPOINT_SOCKET&lt;/code> environment variable must point to the Workload API
socket.&lt;/p>
&lt;p>&lt;code>--authorized-event-server-spiffe-id&lt;/code> authorizes the given SPIFFE IDs of event
servers to which image-automation-controller sends events. When set, the event
recorder uses mTLS.&lt;/p>
&lt;p>Each flag value is interpreted as follows:&lt;/p>
&lt;ul>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;/&amp;lt;path&amp;gt;&lt;/code> authorizes exactly that SPIFFE ID.&lt;/li>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;/&amp;lt;path&amp;gt;/&lt;/code> (with a trailing slash) authorizes any
SPIFFE ID with that path prefix.&lt;/li>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;&lt;/code> (without a path) authorizes any SPIFFE ID in that
trust domain.&lt;/li>
&lt;/ul>
&lt;p>Whenever &lt;code>&amp;lt;trust domain&amp;gt;&lt;/code> equals the special value &lt;code>self&lt;/code>,
image-automation-controller understands it as the trust domain of the
controller&amp;rsquo;s own X509-SVID.&lt;/p>
&lt;p>Invalid values cause image-automation-controller to fail at startup.&lt;/p>
&lt;h3 id="spiffe-broker-api">SPIFFE Broker API&lt;/h3>
&lt;p>When &lt;code>--spiffe-broker-endpoint&lt;/code> and at least one &lt;code>--spiffe-broker-id&lt;/code> are set,
image-automation-controller acquires an X.509-SVID from the SPIFFE Workload API and uses it to
authenticate to the SPIFFE Broker API. The &lt;code>SPIFFE_ENDPOINT_SOCKET&lt;/code> environment
variable must point to the Workload API socket.&lt;/p>
&lt;p>The Broker is used to acquire JWT-SVIDs for object identity when a
ServiceAccount sets &lt;code>credential.auth.fluxcd.io/provider&lt;/code> to &lt;code>spiffe&lt;/code>. The
Broker endpoint is a TCP gRPC target, e.g.
&lt;code>dns:///spire-server.spire.svc.cluster.local:8443&lt;/code>.&lt;/p>
&lt;p>Each &lt;code>--spiffe-broker-id&lt;/code> value is interpreted like the SPIFFE IDs used by the
mTLS flags. Invalid values cause image-automation-controller to fail at startup.&lt;/p>
&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>GitAllBranchReferences&lt;/code>&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;td>Enables the download of all branch head references when push branches are configured.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>GitForcePushBranch&lt;/code>&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;td>Enables the use of &amp;ldquo;force push&amp;rdquo; when pushing changes to a separate branch. This fixes issues with stale push branches.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>GitPushRetryOnFailure&lt;/code>&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Enables retrying a failed push to the push branch on top of the latest remote state, instead of failing the reconciliation.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>GitSparseCheckout&lt;/code>&lt;/td>
&lt;td>&lt;code>false&lt;/code>&lt;/td>
&lt;td>Enables the use of Git sparse checkout to only fetch the path defined in &lt;code>.spec.update.path&lt;/code> from the repository.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="image-reflector-flags">Image reflector 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>--authorized-event-server-spiffe-id&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>SPIFFE ID of an event server authorized to receive events from image-reflector-controller. Can be repeated. When set, the event recorder uses SPIFFE mTLS.&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 kustomize reconciles. (default 4)&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>--gc-interval&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>The interval in number of minutes at which the garbage collector will run for the tags database. Zero disables GC. (default 10)&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>--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>--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>--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.&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>--storage-compression-threshold&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Threshold in KiB for the tags file of a single ImageRepository to make it compressed. Defaults to 64. Requires &lt;code>FluxStorage&lt;/code> enabled.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-path&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>Where to store the persistent database of image metadata. (default &amp;ldquo;/data&amp;rdquo;)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--storage-value-log-file-size&lt;/code>&lt;/td>
&lt;td>int&lt;/td>
&lt;td>Set the database&amp;rsquo;s memory mapped value log file size in bytes. Effective memory usage is about two times this size. (default 268435456)&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>--spiffe-broker-endpoint&lt;/code>&lt;/td>
&lt;td>string&lt;/td>
&lt;td>The gRPC URL of the SPIFFE Broker endpoint.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>--spiffe-broker-id&lt;/code>&lt;/td>
&lt;td>strings&lt;/td>
&lt;td>SPIFFE ID of the SPIFFE Broker endpoint. Can be repeated.&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="spiffe-mtls-1">SPIFFE mTLS&lt;/h3>
&lt;p>When the repeatable flag &lt;code>--authorized-event-server-spiffe-id&lt;/code> is set,
image-reflector-controller acquires an X.509-SVID from the SPIFFE Workload API.
The &lt;code>SPIFFE_ENDPOINT_SOCKET&lt;/code> environment variable must point to the Workload API
socket.&lt;/p>
&lt;p>&lt;code>--authorized-event-server-spiffe-id&lt;/code> authorizes the given SPIFFE IDs of event
servers to which image-reflector-controller sends events. When set, the event
recorder uses mTLS.&lt;/p>
&lt;p>Each flag value is interpreted as follows:&lt;/p>
&lt;ul>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;/&amp;lt;path&amp;gt;&lt;/code> authorizes exactly that SPIFFE ID.&lt;/li>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;/&amp;lt;path&amp;gt;/&lt;/code> (with a trailing slash) authorizes any
SPIFFE ID with that path prefix.&lt;/li>
&lt;li>&lt;code>spiffe://&amp;lt;trust domain&amp;gt;&lt;/code> (without a path) authorizes any SPIFFE ID in that
trust domain.&lt;/li>
&lt;/ul>
&lt;p>Whenever &lt;code>&amp;lt;trust domain&amp;gt;&lt;/code> equals the special value &lt;code>self&lt;/code>,
image-reflector-controller understands it as the trust domain of the
controller&amp;rsquo;s own X509-SVID.&lt;/p>
&lt;p>Invalid values cause image-reflector-controller to fail at startup.&lt;/p>
&lt;h3 id="spiffe-broker-api-1">SPIFFE Broker API&lt;/h3>
&lt;p>When &lt;code>--spiffe-broker-endpoint&lt;/code> and at least one &lt;code>--spiffe-broker-id&lt;/code> are set,
image-reflector-controller acquires an X.509-SVID from the SPIFFE Workload API and uses it to
authenticate to the SPIFFE Broker API. The &lt;code>SPIFFE_ENDPOINT_SOCKET&lt;/code> environment
variable must point to the Workload API socket.&lt;/p>
&lt;p>The Broker is used to acquire JWT-SVIDs for object identity when a
ServiceAccount sets &lt;code>credential.auth.fluxcd.io/provider&lt;/code> to &lt;code>spiffe&lt;/code>. The
Broker endpoint is a TCP gRPC target, e.g.
&lt;code>dns:///spire-server.spire.svc.cluster.local:8443&lt;/code>.&lt;/p>
&lt;p>Each &lt;code>--spiffe-broker-id&lt;/code> value is interpreted like the SPIFFE IDs used by the
mTLS flags. Invalid values cause image-reflector-controller to fail at startup.&lt;/p>
&lt;h3 id="feature-gates-1">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>FluxStorage&lt;/code>&lt;/td>
&lt;td>&lt;code>true&lt;/code>&lt;/td>
&lt;td>Enables the use of Flux&amp;rsquo;s own storage implementation for the image tags database.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table></description></item><item><title>Flux: Image Reflector API Reference</title><link>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/reflector-api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/reflector-api/</guid><description/></item><item><title>Flux: Image Update Automation API Reference</title><link>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/automation-api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/automation-api/</guid><description/></item><item><title>Flux: Image Update Automations</title><link>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/imageupdateautomations/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-2713--fluxcd.netlify.app/flux/components/image/imageupdateautomations/</guid><description>
&lt;p>The &lt;code>ImageUpdateAutomation&lt;/code> API defines an automation process that will update a
Git repository, based on &lt;code>ImagePolicy&lt;/code> objects in the same namespace.&lt;/p>
&lt;p>The updates are governed by marking fields to be updated in each YAML file. For
each field marked, the automation process checks the image policy named, and
updates the field value if there is a new image selected by the policy. The
marker format is shown in the
&lt;a href="https://fluxcd.io/flux/guides/image-update/#configure-image-update-for-custom-resources" target="_blank">image automation guide&lt;/a>.&lt;/p>
&lt;h2 id="example">Example&lt;/h2>
&lt;p>The following is an example of keeping the images in a Git repository
up-to-date:&lt;/p>
&lt;div class="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/fluxcd/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">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/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">interval&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>5h&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImagePolicy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo-policy&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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">imageRepositoryRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">policy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">semver&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">range&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">5.0&lt;/span>.x&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>podinfo-update&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>30m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">sourceRef&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>GitRepository&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">author&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">email&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>fluxcdbot@users.noreply.github.com&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>fluxcdbot&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Update container images
&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"> {{ .Changed.Summary }}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">update&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#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>GitRepository.metadata.name&lt;/code> field. The Git repository at
&lt;code>https://github.com/fluxcd/example&lt;/code> is assumed to contain YAML files with
image policy markers, as described in
&lt;a href="https://fluxcd.io/flux/guides/image-update/#configure-image-update-for-custom-resources" target="_blank">image automation
guide&lt;/a>, to update them.&lt;/li>
&lt;li>An ImageRepository named &lt;code>podinfo&lt;/code> is created, indicated by the
&lt;code>ImageRepository.metadata.name&lt;/code> field. This scans all the tags for an image repository.&lt;/li>
&lt;li>An ImagePolicy named &lt;code>podinfo-policy&lt;/code> is created, indicated by the
&lt;code>ImagePolicy.metadata.name&lt;/code> field.&lt;/li>
&lt;li>An ImageUpdateAutomation named &lt;code>podinfo-update&lt;/code> is created, indicated by the
&lt;code>ImageUpdateAutomation.metadata.name&lt;/code> field.&lt;/li>
&lt;li>The ImagePolicy refers to the &lt;code>podinfo&lt;/code> ImageRepository to query for all the
tags related to an image, indicated by &lt;code>ImagePolicy.spec.imageRepositoryRef&lt;/code>.
These tags are then evaluated to select the latest image with tag based on the
policy rules, indicated by &lt;code>ImagePolicy.spec.policy&lt;/code>.&lt;/li>
&lt;li>The ImageUpdateAutomation refers to &lt;code>podinfo&lt;/code> GitRepository as the source that
should be kept up-to-date, indicated by
&lt;code>ImageUpdateAutomation.spec.sourceRef&lt;/code>.&lt;/li>
&lt;li>The image-automation-controller lists all the ImagePolicies in the
ImageUpdateAutomation&amp;rsquo;s namespace. It then checks out the Git repository
&lt;code>main&lt;/code> branch, as configured in &lt;code>GitRepository.spec.ref.branch&lt;/code>. It then goes
through the YAML manifests from the root of the Git repository, as configured
in &lt;code>ImageUpdateAutomation.spec.update.path&lt;/code> and applies updates based on the
latest images from the image policies. The source changes are saved as a Git
commit with the commit author defined in
&lt;code>ImageUpdateAutomation.spec.git.commit.author&lt;/code>. The commit message is
rendered from &lt;code>ImageUpdateAutomation.spec.git.commit.messageTemplate&lt;/code>, where
&lt;code>.Changed.Summary&lt;/code> lists the image updates, see
&lt;a href="#message-template">Message Template&lt;/a>. The commit is then pushed to the
remote Git repository&amp;rsquo;s &lt;code>main&lt;/code> branch, indicated by
&lt;code>ImageUpdateAutomation.spec.git.push.branch&lt;/code>.&lt;/li>
&lt;li>The push commit hash is reported in the
&lt;code>ImageUpdateAutomation.status.lastPushCommit&lt;/code> field and the push time is
reported in &lt;code>.status.lastPushTime&lt;/code> field.&lt;/li>
&lt;/ul>
&lt;p>This example can be run by saving the manifest into
&lt;code>imageupdateautomation.yaml&lt;/code>.&lt;/p>
&lt;ol>
&lt;li>Apply the resource on the cluster:&lt;/li>
&lt;/ol>
&lt;div class="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 imageupdateautomation.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="2">
&lt;li>Run &lt;code>kubectl get imageupdateautomation&lt;/code> to see the ImageUpdateAutomation:&lt;/li>
&lt;/ol>
&lt;div class="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 LAST RUN
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">podinfo-update 2024-03-17T22:22:34Z
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol start="3">
&lt;li>Run &lt;code>kubectl describe imageupdateautomation podinfo-update&lt;/code> to see the
&lt;a href="#">Last
Push Commit&lt;/a> and
&lt;a href="#conditions">Conditions&lt;/a> in the ImageUpdateAutomation&amp;rsquo;s
Status:&lt;/li>
&lt;/ol>
&lt;div class="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"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-03-17T22:22:33Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: repository up-to-date
&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 Automation Run Time: 2024-03-17T22:22:34Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Push Commit: 3ebb95cc56d2db59bc6ffbe0d9dd0ea445edeb77
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Push Time: 2024-03-17T22:22:34Z
&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"> Observed Policies:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Podinfo - Policy:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Name: ghcr.io/stefanprodan/podinfo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Tag: 5.0.3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Source Revision: main@sha1:3ebb95cc56d2db59bc6ffbe0d9dd0ea445edeb77
&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 Succeeded 5s (x2 over 6s) image-automation-controller repository up-to-date
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Normal Succeeded 5s image-automation-controller pushed commit &amp;#39;3ebb95c&amp;#39; to branch &amp;#39;main&amp;#39;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Update container images
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">&lt;/span>&lt;span style="">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="">&lt;/span>&lt;span style="color:#888"> ghcr.io/stefanprodan/podinfo:5.0.2 -&amp;gt; ghcr.io/stefanprodan/podinfo:5.0.3
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="writing-an-imageupdateautomation-spec">Writing an ImageUpdateAutomation spec&lt;/h2>
&lt;p>As with all other Kubernetes config, an ImageUpdateAutomation needs
&lt;code>apiVersion&lt;/code>, &lt;code>kind&lt;/code>, and &lt;code>metadata&lt;/code> fields. The name of an
ImageUpdateAutomation 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 ImageUpdateAutomation 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 to specify a reference to a source object
in the same namespace as the ImageUpdateAutomation or in another namespace. The
only supported source kind at the moment is &lt;code>GitRepository&lt;/code>, which is used by
default if the &lt;code>.spec.sourceRef.kind&lt;/code> is not specified. The source reference
name is a required field, &lt;code>.spec.sourceRef.name&lt;/code>. The source reference namespace
is optional, &lt;code>.spec.sourceRef.namespace&lt;/code>. If not specified, the source is
assumed to be in the same namespace as the ImageUpdateAutomation. The
GitRepository must contain the authentication configuration required to check
out the source, if any.&lt;/p>
&lt;div class="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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">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>&amp;lt;gitrepository-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">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;gitrepository-namespace&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>By default, GitRepository in a different namespace can be referenced. This can
be disabled by setting the controller flag &lt;code>--no-cross-namespace-refs&lt;/code>.&lt;/p>
&lt;p>The timeouts used in the Git operations for an ImageUpdateAutomation is derived
from the referenced GitRepository source. &lt;code>GitRepository.spec.timeout&lt;/code> can be
tuned to adjust the Git operation timeout.&lt;/p>
&lt;p>The proxy configurations are also derived from the referenced GitRepository
source. &lt;code>GitRepository.spec.proxySecretRef&lt;/code> can be used to configure proxy use.&lt;/p>
&lt;h4 id="gitrepository-provider">GitRepository Provider&lt;/h4>
&lt;p>&lt;code>GitRepository&lt;/code> can be configured to specify an OIDC
&lt;a href="https://fluxcd.io/flux/components/source/gitrepositories/#provider" target="_blank">provider&lt;/a>
for authentication using &lt;code>GitRepository.spec.provider&lt;/code> field. Image automation
controller can be configured to authenticate using the provider as described
below.&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-2713--fluxcd.netlify.app/flux/integrations/">docs&lt;/a>.&lt;/p>
&lt;p>For a complete guide to the ServiceAccount annotations used for object
identity, including the &lt;code>spiffe&lt;/code> credential provider, see the
&lt;a href="https://deploy-preview-2713--fluxcd.netlify.app/flux/integrations/object-identity/">Object Identity&lt;/a> docs.&lt;/p>
&lt;h5 id="azure">Azure&lt;/h5>
&lt;p>If the provider is set to &lt;code>azure&lt;/code>, make sure the
&lt;a href="https://fluxcd.io/flux/components/source/gitrepositories/#azure" target="_blank">pre-requisites&lt;/a>
are satisfied. To configure image automation controller to use workload
identity,&lt;/p>
&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
image-automation-controller service account. In the default installation, the
image-automation-controller service account is located in the &lt;code>flux-system&lt;/code>
namespace with name &lt;code>image-automation-controller&lt;/code>. Ensure the federated
credential uses the correct namespace and name of the
image-automation-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
flux-system/kustomization.yaml 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: image-automation-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: image-automation-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;h5 id="github">GitHub&lt;/h5>
&lt;p>If the provider is set to &lt;code>github&lt;/code>, make sure the GitHub App is registered and
installed with the necessary permissions and the github app secret is configured
as described
&lt;a href="https://fluxcd.io/flux/components/source/gitrepositories/#github" target="_blank">here&lt;/a>.&lt;/p>
&lt;h3 id="git-specification">Git specification&lt;/h3>
&lt;p>&lt;code>.spec.git&lt;/code> is a required field to specify Git configurations related to source
&lt;code>checkout&lt;/code>, &lt;code>commit&lt;/code> and &lt;code>push&lt;/code> operations.&lt;/p>
&lt;h4 id="checkout">Checkout&lt;/h4>
&lt;p>&lt;code>.spec.git.checkout&lt;/code> is an optional field to specify the Git reference to check
out. The &lt;code>.spec.git.checkout.ref&lt;/code> field is the same as the
&lt;code>GitRepository.spec.ref&lt;/code> field. It can be used to override the checkout
configuration in the referenced GitRepository. Not specifying this reference
defaults to the checkout reference of the associated 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-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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">checkout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&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>If &lt;code>.spec.git.push&lt;/code> is unspecified, &lt;code>.spec.git.checkout&lt;/code> will be used as the
push branch for any updates.&lt;/p>
&lt;p>By default the controller will only do shallow clones, but this can be disabled
by starting the controller with flag &lt;code>--feature-gates=GitShallowClone=false&lt;/code>.&lt;/p>
&lt;h4 id="commit">Commit&lt;/h4>
&lt;p>&lt;code>.spec.git.commit&lt;/code> is a required field to specify the details about the commit
made by the automation.&lt;/p>
&lt;h5 id="author">Author&lt;/h5>
&lt;p>&lt;code>.spec.git.commit.author&lt;/code> is a required field to specify the commit author. The
author &lt;code>.email&lt;/code> is required. The author &lt;code>.name&lt;/code> is optional. The name and email
are used as the author of the commits made by the automation.&lt;/p>
&lt;div class="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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">author&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">email&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;author-email&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">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;author-name&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="signing-key">Signing Key&lt;/h5>
&lt;p>&lt;code>.spec.git.commit.signingKey&lt;/code> is an optional field to specify a signing key to
sign the commits with. The signing-key Secret must live in the same namespace
as the ImageUpdateAutomation.&lt;/p>
&lt;p>The &lt;code>.spec.git.commit.signingKey.type&lt;/code> field selects the signing-key format:
&lt;code>gpg&lt;/code> (default) for OpenPGP keys, or &lt;code>ssh&lt;/code> for SSH keys.&lt;/p>
&lt;h6 id="openpgp">OpenPGP&lt;/h6>
&lt;p>With &lt;code>type: gpg&lt;/code> (the default), &lt;code>.secretRef.name&lt;/code> refers to a Secret containing
an ASCII-armored OpenPGP key in a field named &lt;code>git.asc&lt;/code>. If the private key is
protected by a passphrase, the passphrase can be specified in the same Secret
in a field named &lt;code>passphrase&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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">signingKey&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>signing-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:#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>signing-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">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">git.asc&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"> &amp;lt;ARMOR ENCODED OPENPGP KEY&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">passphrase&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;private-key-passphrase&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h6 id="ssh">SSH&lt;/h6>
&lt;p>With &lt;code>type: ssh&lt;/code>, &lt;code>.secretRef.name&lt;/code> refers to a Secret containing the SSH
private key in a field named &lt;code>identity&lt;/code>, optionally with the key&amp;rsquo;s passphrase
in a field named &lt;code>password&lt;/code>. These conventions match the SSH transport-auth
Secret format used by &lt;code>GitRepository&lt;/code>, so when the ImageUpdateAutomation and
the GitRepository share a namespace, a single Secret can serve both transport
and signing.&lt;/p>
&lt;div class="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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">signingKey&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ssh&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>signing-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:#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>signing-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">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"> &amp;lt;OPENSSH PRIVATE KEY&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">password&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;private-key-passphrase&amp;gt;&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Supported SSH key algorithms: &lt;code>ssh-ed25519&lt;/code>, &lt;code>ecdsa-sha2-nistp256&lt;/code>,
&lt;code>ecdsa-sha2-nistp384&lt;/code>, &lt;code>ecdsa-sha2-nistp521&lt;/code>, and &lt;code>ssh-rsa&lt;/code> (key size
≥ 2048-bit). Only OpenSSH-format private keys (&lt;code>-----BEGIN OPENSSH PRIVATE KEY-----&lt;/code>) are accepted; convert PKCS#1 or PKCS#8 keys with &lt;code>ssh-keygen -p&lt;/code>
before placing them in the Secret.&lt;/p>
&lt;h5 id="message-template">Message Template&lt;/h5>
&lt;p>&lt;code>.spec.git.commit.messageTemplate&lt;/code> is an optional field to specify the commit
message template. If unspecified, a default commit message is used.&lt;/p>
&lt;div class="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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Update container images
&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"> {{ .Changed.Summary }}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For a &lt;code>:tag&lt;/code> setter that updates &lt;code>6.5.0&lt;/code> to &lt;code>6.5.1&lt;/code>, the commit message is:&lt;/p>
&lt;pre tabindex="0">&lt;code>Update container images
ghcr.io/stefanprodan/podinfo tag 6.5.0 -&amp;gt; 6.5.1
&lt;/code>&lt;/pre>&lt;p>&lt;code>.Changed.Summary&lt;/code> describes the changes made by the automation in a form ready
for the commit message, one line per change. The controller runs an update as
soon as an ImagePolicy reports a new image, so the summary usually describes a
single image update. Place the summary in the commit body, after a subject line
and a blank line, as in the example above.&lt;/p>
&lt;p>The form of each line depends on the setter that made the change (see
&lt;a href="#marking-images-for-update">Marking images for update&lt;/a>):&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Setter&lt;/th>
&lt;th>Line&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>&amp;lt;namespace&amp;gt;:&amp;lt;policy&amp;gt;&lt;/code>&lt;/td>
&lt;td>&lt;code>&amp;lt;old&amp;gt; -&amp;gt; &amp;lt;new&amp;gt;&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>&amp;lt;namespace&amp;gt;:&amp;lt;policy&amp;gt;:tag&lt;/code>&lt;/td>
&lt;td>&lt;code>&amp;lt;image&amp;gt; tag &amp;lt;old&amp;gt; -&amp;gt; &amp;lt;new&amp;gt;&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>&amp;lt;namespace&amp;gt;:&amp;lt;policy&amp;gt;:digest&lt;/code>&lt;/td>
&lt;td>&lt;code>&amp;lt;image&amp;gt;:&amp;lt;tag&amp;gt; digest &amp;lt;old&amp;gt; -&amp;gt; &amp;lt;new&amp;gt;&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>&amp;lt;namespace&amp;gt;:&amp;lt;policy&amp;gt;:name&lt;/code>&lt;/td>
&lt;td>&lt;code>&amp;lt;image&amp;gt; name &amp;lt;old&amp;gt; -&amp;gt; &amp;lt;new&amp;gt;&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;code>&amp;lt;image&amp;gt;&lt;/code> and &lt;code>&amp;lt;tag&amp;gt;&lt;/code> are the name and the tag of the latest image reported by
the ImagePolicy at the time of the update. The digest line carries the policy&amp;rsquo;s
tag, not the tag in the file, because the new digest is the digest of that tag.
Old and new values are printed exactly as they appear in the file, and digests
are not shortened.&lt;/p>
&lt;p>When an update makes several changes, the lines are sorted and identical lines
are merged, so a change made in several files, for example in multiple
overlays, is listed once. An image marked with both a tag and a digest setter
gets a tag line and a digest line when both values change.&lt;/p>
&lt;p>For example, with an ImagePolicy that selects the &lt;code>latest&lt;/code> tag and has
&lt;code>.spec.digestReflectionPolicy&lt;/code> set to &lt;code>Always&lt;/code>, and the following
&lt;code>kustomization.yaml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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">images&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">newName&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/stefanprodan/podinfo&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:podinfo:name&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">newTag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>latest&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:podinfo:tag&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">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:6129bb944cada32b4662eafd13fd9904d34c77286bf2ec4523eaedb711757cb0&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:podinfo:digest&amp;#34;}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>a new image pushed with the &lt;code>latest&lt;/code> tag only changes the digest, and the
summary is:&lt;/p>
&lt;pre tabindex="0">&lt;code>ghcr.io/stefanprodan/podinfo:latest digest sha256:6129bb944cada32b4662eafd13fd9904d34c77286bf2ec4523eaedb711757cb0 -&amp;gt; sha256:5f8c3b1e7a0d9b2c4e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f3a5b7c9d
&lt;/code>&lt;/pre>&lt;p>To write the summary as a list, prefix each line in the template:&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Update container images
&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"> {{ with .Changed.Summary }}{{ . | replace &amp;#34;\n&amp;#34; &amp;#34;\n- &amp;#34; | printf &amp;#34;- %s&amp;#34; }}{{ end }}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The message template has access to the data related to the changes made by
the automation. The template is a
&lt;a href="https://golang.org/pkg/text/template/" target="_blank">Go text template&lt;/a>. The data
available to the template have the following structure (not reproduced
verbatim):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// TemplateData is the type of the value given to the commit message
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// template.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">type&lt;/span> TemplateData &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> AutomationObject &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Name, Namespace &lt;span style="color:#902000">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Changed update.Result
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Values &lt;span style="color:#007020;font-weight:bold">map&lt;/span>[&lt;span style="color:#902000">string&lt;/span>]&lt;span style="color:#902000">string&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:#60a0b0;font-style:italic">// Result contains the file changes made during the update. It contains
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// details about the exact changes made to the files and the objects in them. It
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// has a nested structure file-&amp;gt;objects-&amp;gt;changes.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">type&lt;/span> Result &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> FileChanges &lt;span style="color:#007020;font-weight:bold">map&lt;/span>[&lt;span style="color:#902000">string&lt;/span>]ObjectChanges
&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:#60a0b0;font-style:italic">// ObjectChanges contains all the changes made to objects.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">type&lt;/span> ObjectChanges &lt;span style="color:#007020;font-weight:bold">map&lt;/span>[ObjectIdentifier][]Change
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// ObjectIdentifier holds the identifying data for a particular
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// object. This won&amp;#39;t always have a name (e.g., a kustomization.yaml).
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">type&lt;/span> ObjectIdentifier &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Name, Namespace, APIVersion, Kind &lt;span style="color:#902000">string&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:#60a0b0;font-style:italic">// Change contains the setter that resulted in a Change, the old and the new
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// value after the Change.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">type&lt;/span> Change &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> OldValue &lt;span style="color:#902000">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> NewValue &lt;span style="color:#902000">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Setter &lt;span style="color:#902000">string&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>Changed&lt;/code> template data field also has helper methods:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go" data-lang="go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// Changes returns all the changes that were made in at least one update.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">func&lt;/span> (r Result) &lt;span style="color:#06287e">Changes&lt;/span>() []Change
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// Objects returns ObjectChanges, regardless of which file they appear in.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">func&lt;/span> (r Result) &lt;span style="color:#06287e">Objects&lt;/span>() ObjectChanges
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">// Summary returns a description of the changes, one line per distinct change.
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#60a0b0;font-style:italic">&lt;/span>&lt;span style="color:#007020;font-weight:bold">func&lt;/span> (r Result) &lt;span style="color:#06287e">Summary&lt;/span>() &lt;span style="color:#902000">string&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>For other formats, range over the fields and methods above, 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">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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Automated image update
&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"> Automation name: {{ .AutomationObject }}
&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"> Files:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ range $filename, $_ := .Changed.FileChanges -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $filename }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}
&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"> Objects:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ range $resource, $changes := .Changed.Objects -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $resource.Kind }} {{ $resource.Name }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> Changes:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{- range $_, $change := $changes }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $change.OldValue }} -&amp;gt; {{ $change.NewValue }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With template functions, it is possible to manipulate and transform the supplied
data in order to generate more complex commit messages.&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Automated image update
&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"> Automation name: {{ .AutomationObject }}
&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"> Files:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ range $filename, $_ := .Changed.FileChanges -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $filename }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}
&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"> Objects:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ range $resource, $changes := .Changed.Objects -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $resource.Kind | lower }} {{ $resource.Name | lower }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> Changes:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{- range $_, $change := $changes }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ if contains &amp;#34;5.0.3&amp;#34; $change.NewValue -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> - {{ $change.OldValue }} -&amp;gt; {{ $change.NewValue }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ else -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> [skip ci] wrong image
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{ end -}}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>There are over 70 available functions. Some of them are defined by the
&lt;a href="https://pkg.go.dev/text/template" target="_blank">Go
template language&lt;/a> itself. Most of the others
are part of the
&lt;a href="http://masterminds.github.io/sprig/" target="_blank">Sprig template library&lt;/a>.&lt;/p>
&lt;p>Additional data can be provided with &lt;code>.spec.git.commit.messageTemplateValues&lt;/code>.&lt;/p>
&lt;p>This is a key/value mapping with string 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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Automated image update by Flux for cluster {{ .Values.cluster }}.&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplateValues&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">cluster&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>prod&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="push">Push&lt;/h4>
&lt;p>&lt;code>.spec.git.push&lt;/code> is an optional field that specifies how the commits are pushed
to the remote source repository.&lt;/p>
&lt;h5 id="branch">Branch&lt;/h5>
&lt;p>&lt;code>.spec.git.push.branch&lt;/code> field specifies the remote branch to push to. If
unspecified, the commits are pushed to the branch specified in
&lt;code>.spec.git.checkout.branch&lt;/code>. If &lt;code>.spec.git.checkout&lt;/code> is also unspecified, it
will fall back to the branch specified in the associated GitRepository&amp;rsquo;s
&lt;code>.spec.sourceRef&lt;/code>. If none of these yield a push branch name, the automation
will fail.&lt;/p>
&lt;p>The push branch will be created locally if it does not already exist, starting
from the checkout branch. If the push branch already exists, it will be
overwritten with the cloned version plus the changes made by the controller.
Alternatively, force push can be disabled by starting the controller with flag
&lt;code>--feature-gates=GitForcePushBranch=false&lt;/code>, in which case the updates will be
calculated on top of any commits already on the push branch. Note that without
force push in push branches, if the target branch is stale, the controller may
not be able to conclude the operation and will consistently fail until the
branch is either deleted or refreshed.&lt;/p>
&lt;p>In the following snippet, updates will be pushed as commits to the branch
&lt;code>auto&lt;/code>, and when that branch does not exist at the origin, it will be created
locally starting from the branch &lt;code>main&lt;/code>, and pushed:&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">checkout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>auto&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="refspec">Refspec&lt;/h5>
&lt;p>&lt;code>.spec.git.push.refspec&lt;/code> field specifies the refspec to push to any arbitrary
destination reference. An example of a valid refspec is
&lt;code>refs/heads/branch:refs/heads/branch&lt;/code>.&lt;/p>
&lt;p>Deletion refspecs with an empty source (for example,
&lt;code>:refs/heads/branch&lt;/code>) and force-update refspecs prefixed with &lt;code>+&lt;/code> are not
supported. Force pushing is controlled by the
&lt;a href="#branch">&lt;code>GitForcePushBranch&lt;/code> feature gate&lt;/a>.&lt;/p>
&lt;p>If both &lt;code>.push.refspec&lt;/code> and &lt;code>.push.branch&lt;/code> are specified, then the reconciler
will push to both the destinations. This is particularly useful for working with
Gerrit servers. For more information about this, please refer to the
&lt;a href="#gerrit">Gerrit&lt;/a> section. This can also be used to automatically open
Pull-Requests in Gitea or Forgejo. See the
&lt;a href="#gitea">Gitea&lt;/a> section for
an example.&lt;/p>
&lt;p>If only &lt;code>.push.refspec&lt;/code> is set, without explicitly defining a &lt;code>.push.branch&lt;/code>, the
controller falls back to pushing to the branch from &lt;code>checkoutRef&lt;/code> and &lt;em>also&lt;/em>
pushes to &lt;code>.push.refspec&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> If both &lt;code>.push.refspec&lt;/code> and &lt;code>.push.branch&lt;/code> are essentially equal to
each other (for e.g.: &lt;code>.push.refspec: refs/heads/main:refs/heads/main&lt;/code> and
&lt;code>.push.branch: main&lt;/code>), then the reconciler might fail with an &lt;code>already up-to-date&lt;/code> error.&lt;/p>
&lt;p>In the following snippet, updates and commits will be made on the &lt;code>main&lt;/code> branch locally.
The commits will be then pushed using the &lt;code>refs/heads/main:refs/heads/auto&lt;/code> refspec:&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">checkout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">refspec&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>refs/heads/main:refs/heads/auto&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="push-options">Push options&lt;/h5>
&lt;p>To specify the
&lt;a href="https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt" target="_blank">push options&lt;/a>
to be sent to the upstream Git server, use &lt;code>.push.options&lt;/code>. These options can be
used to perform operations as a result of the push. For example, using the below
push options will open a GitLab Merge Request to the &lt;code>release&lt;/code> branch
automatically with the commit the controller pushed to the &lt;code>dev&lt;/code> branch:&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>dev&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">options&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">merge_request.create&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">merge_request.target&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>release&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h5 id="push-retries">Push retries&lt;/h5>
&lt;p>When several automations or other writers push to the same branch, a push can
be rejected because the branch moved on the remote after the controller cloned
it. By default, the push is only attempted again at the next reconciliation.&lt;/p>
&lt;p>When the controller is started with the flag
&lt;code>--feature-gates=GitPushRetryOnFailure=true&lt;/code>, it retries a failed push to the
push branch. Before each retry, it waits, discards its commit, catches up with
the remote push branch, and applies the policies and commits the changes
again. If the remote already has the changes, nothing is pushed. If the remote
push branch is at the commit of the failed push, for example because the push
timed out after the remote accepted it, the push counts as successful, and the
commit is pushed to &lt;code>.spec.git.push.refspec&lt;/code>, if set. The wait starts at 2
seconds and doubles for each retry, plus a random jitter of up to 50%. The
controller makes up to 5 attempts, and stops retrying at half of
&lt;code>.spec.interval&lt;/code> or 2 minutes, whichever is shorter, after the first attempt
failed, cancelling any clone or push in progress. Failed pushes to
&lt;code>.spec.git.push.refspec&lt;/code> are not retried, and neither are pushes over HTTP(S)
that fail because the credentials are rejected, lack write access, or the
repository is not found.&lt;/p>
&lt;p>If another writer pushes on top of the commit of a failed push that reached
the remote before the controller catches up, the controller finds that the
remote already has the changes. As it can&amp;rsquo;t tell that its own push reached the
remote, it does not record the push in the status, does not emit an event, and
does not push the commit to &lt;code>.spec.git.push.refspec&lt;/code>.&lt;/p>
&lt;p>To catch up with the remote, the controller clones the repository again, with
the same shallow clone and sparse checkout settings. When the push branch
differs from the checkout branch, the &lt;code>GitAllBranchReferences&lt;/code> feature gate is
enabled, and &lt;code>.spec.git.push.refspec&lt;/code> is not set, it clones only the push
branch, and clones the checkout branch instead if that fails, for example
because the push branch does not exist on the remote. When the feature gate is
disabled, the push branch is created from the checkout branch again, as at
every reconciliation.&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
Image update is attempted.&lt;/p>
&lt;p>After successfully reconciling the object, the image-automation-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>ImagePolicy changes also trigger a run outside the interval window (see
&lt;a href="#policy-change-delay">Policy change delay&lt;/a>).&lt;/p>
&lt;h3 id="policy-change-delay">Policy change delay&lt;/h3>
&lt;p>&lt;code>.spec.policyChangeDelay&lt;/code> is an optional field that delays the run triggered by
an ImagePolicy reporting a new latest image, so that image updates arriving close
together go into one commit. When not set, or set to &lt;code>0s&lt;/code>, the automation runs
as soon as a policy changes.&lt;/p>
&lt;div class="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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">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">policyChangeDelay&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>2m&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The delay starts at the first policy change and is not extended by later
changes.&lt;/p>
&lt;p>The batching is best-effort. Runs triggered by the interval, spec changes,
GitRepository changes and
&lt;a href="#triggering-a-reconciliation">manual reconciliation requests&lt;/a>
are not delayed, and they replace the pending run. Pending runs are
not persisted: after a controller restart, every automation runs right away.&lt;/p>
&lt;p>This field respects
&lt;a href="#policyselector">&lt;code>.spec.policySelector&lt;/code>&lt;/a>. If both are set,
only changes to the selected policies trigger a run.&lt;/p>
&lt;h3 id="update">Update&lt;/h3>
&lt;p>&lt;code>.spec.update&lt;/code> is an optional field that specifies how to carry out the updates
on a source. The only supported update strategy at the moment is &lt;code>Setters&lt;/code>,
which is used by default for &lt;code>.spec.update.strategy&lt;/code> field. The
&lt;code>.spec.update.path&lt;/code> is an optional field to specify the directory containing the
manifests to be updated. If not specified, it defaults to the root of the source
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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">update&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>&amp;lt;/path/to/manifest&amp;gt;&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 an
ImageUpdateAutomation. When set to &lt;code>true&lt;/code>, the controller will stop reconciling
the ImageUpdateAutomation, and changes to the resource or image policies or Git
repository will not result in any update. When the field is set to &lt;code>false&lt;/code> or
removed, it will resume.&lt;/p>
&lt;h3 id="policyselector">PolicySelector&lt;/h3>
&lt;p>&lt;code>.spec.policySelector&lt;/code> is an optional field to limit policies that an
ImageUpdateAutomation takes into account. It supports the same selectors as
&lt;code>Deployment.spec.selector&lt;/code> (&lt;code>matchLabels&lt;/code> and &lt;code>matchExpressions&lt;/code> fields). If
not specified, it defaults to &lt;code>matchLabels: {}&lt;/code> which means all policies in
namespace. When
&lt;a href="#policy-change-delay">&lt;code>.spec.policyChangeDelay&lt;/code>&lt;/a> is set, the
selector also filters which ImagePolicy changes trigger a run.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">policySelector&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">matchLabels&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">app.kubernetes.io/instance&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:#0e84b5;font-weight:bold">---&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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">policySelector&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">matchExpressions&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">key&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>app.kubernetes.io/component&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">operator&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>In&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">values&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- my-component&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- my-other-component&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="working-with-imageupdateautomation">Working with ImageUpdateAutomation&lt;/h2>
&lt;h3 id="marking-images-for-update">Marking images for update&lt;/h3>
&lt;p>In order to tell ImageUpdateAutomation to update images in a manifest, the
images must be marked with &lt;em>setters&lt;/em>. A setter is a comment at the end of a
line telling exactly which ImagePolicy to use for that line, and optionally
also which field of the image elected as latest by the policy to update in
that line. This is useful for example in Helm charts, where images are often
defined by multiple values, such as the repository URL, a tag, and optionally
a digest.&lt;/p>
&lt;p>For example, if you want to use the ImagePolicy &lt;code>my-policy&lt;/code> from the
&lt;code>flux-system&lt;/code> namespace, you could use it in a Deployment like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>apps/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Deployment&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-app&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">template&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">spec&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">containers&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>- &lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>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">image&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/my-org/my-app:4.0.6&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:my-policy&amp;#34;}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Deployments expect the image to be fully specified, including tag
and optionally digest, so for Deployments the setter is the basic
one, not specifying any fields of the image.&lt;/p>
&lt;p>If your app is instead deployed by a Flux HelmRelease whose chart
supports image fields, you can use the image fields like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>helm.toolkit.fluxcd.io/v2&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>HelmRelease&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-app&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">namespace&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>default&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">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">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">image&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ghcr.io/my-org/my-app&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:my-policy:name&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">tag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">4.0.6&lt;/span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:my-policy:tag&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">digest&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>sha256:6129bb944cada32b4662eafd13fd9904d34c77286bf2ec4523eaedb711757cb0&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#60a0b0;font-style:italic"># {&amp;#34;$imagepolicy&amp;#34;: &amp;#34;flux-system:my-policy:digest&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> For the &lt;code>digest&lt;/code> field to be available in the ImagePolicy status,
the &lt;code>.spec.digestReflectionPolicy&lt;/code> field of the ImagePolicy must be set to
&lt;code>IfNotPresent&lt;/code> or &lt;code>Always&lt;/code>. For a complete guide on digest reflection,
see these
&lt;a href="https://deploy-preview-2713--fluxcd.netlify.app/flux/guides/image-update/#digest-pinning">docs&lt;/a>.&lt;/p>
&lt;h3 id="triggering-a-reconciliation">Triggering a reconciliation&lt;/h3>
&lt;p>To manually tell the image-automation-controller to reconcile an
ImageUpdateAutomation outside of the
&lt;a href="#interval">specified interval window&lt;/a>, an
ImageUpdateAutomation can be annotated with
&lt;code>reconcile.fluxcd.io/requestedAt: &amp;lt;arbitrary value&amp;gt;&lt;/code>. Annotating the resource
queues the ImageUpdateAutomation 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 imageupdateautomation/&amp;lt;automation-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 image update &amp;lt;automation-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 ImageUpdateAutomation
to reach a
&lt;a href="#ready-imageupdateautomation">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> imageupdateautomation/&amp;lt;automation-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 ImageUpdateAutomation, 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-imageupdateautomation">Suspend an ImageUpdateAutomation&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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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 imageupdateautomation &amp;lt;automation-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> image update &amp;lt;automation-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h4 id="resume-an-imageupdateautomation">Resume an ImageUpdateAutomation&lt;/h4>
&lt;p>In your YAML declaration, comment out (or remove) the &lt;code>.spec.suspend&lt;/code> 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>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&amp;lt;automation-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 imageupdateautomation &amp;lt;automation-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 image update &amp;lt;automation-name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="debugging-an-imageupdateautomation">Debugging an ImageUpdateAutomation&lt;/h3>
&lt;p>There are several ways to gather information about an ImageUpdateAutomation for
debugging purposes.&lt;/p>
&lt;h4 id="describe-the-imageupdateautomation">Describe the ImageUpdateAutomation&lt;/h4>
&lt;p>Describing an ImageUpdateAutomation using
&lt;code>kubectl describe imageupdateautomation &amp;lt;automation-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"> Conditions:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Transition Time: 2024-03-18T20:00:56Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: processing object: new generation 6 -&amp;gt; 7
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 7
&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-03-18T20:00:54Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Message: failed to checkout source: unable to clone &amp;#39;https://github.com/fluxcd/example&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/non-existing-branch&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 7
&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 Automation Run Time: 2024-03-18T20:00:56Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Handled Reconcile At: 1710791381
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Push Commit: 8084f1bb180ac259c6698cd027064b7dce86a72a
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Last Push Time: 2024-03-18T18:53:04Z
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Generation: 6
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Policies:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Podinfo - Policy:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Name: ghcr.io/stefanprodan/podinfo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Tag: 4.0.6
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Observed Source Revision: main@sha1:8084f1bb180ac259c6698cd027064b7dce86a72a
&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 Succeeded 11m (x11 over 170m) image-automation-controller no change since last reconciliation
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888"> Warning GitOperationFailed 2s (x3 over 4s) image-automation-controller failed to checkout source: unable to clone &amp;#39;https://github.com/fluxcd/example&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/non-existing-branch&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 ImageUpdateAutomation(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 ImageUpdateAutomation/&amp;lt;automation-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">3m29s (x7 over 4m17s) Warning GitOperationFailed ImageUpdateAutomation/&amp;lt;automation-name&amp;gt; failed to checkout source: unable to clone &amp;#39;https://github.com/fluxcd/example&amp;#39;: couldn&amp;#39;t find remote ref &amp;#34;refs/heads/non-existing-branch&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">3m14s (x4 over 3h24m) Normal Succeeded ImageUpdateAutomation/&amp;lt;automation-name&amp;gt; repository up-to-date
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888">2m41s (x12 over 174m) Normal Succeeded ImageUpdateAutomation/&amp;lt;automation-name&amp;gt; no change since last reconciliation
&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 ImageUpdateAutomation, e.g.
&lt;code>flux logs --level=error --kind=ImageUpdateAutomation --name=&amp;lt;automation-name&amp;gt;&lt;/code>.&lt;/p>
&lt;h4 id="gerrit">Gerrit&lt;/h4>
&lt;p>
&lt;a href="https://www.gerritcodereview.com/" target="_blank">Gerrit&lt;/a> operates differently from a
standard Git server. Rather than sending individual commits to a branch,
all changes are bundled into a single commit. This commit requires a distinct
identifier separate from the commit SHA. Additionally, instead of initiating
a Pull Request between branches, the commit is pushed using a refspec:
&lt;code>HEAD:refs/for/main&lt;/code>.&lt;/p>
&lt;p>As the image-automation-controller is primarily designed to work with
standard Git servers, these special characteristics necessitate a few
workarounds. The following is an example configuration that works
well with Gerrit:&lt;/p>
&lt;div class="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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">checkout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">author&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">email&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux@localdomain&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&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"> Perform automatic image update
&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"> Automation name: {{ .AutomationObject }}
&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"> {{- $ChangeId := .AutomationObject -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{- $ChangeId = printf &amp;#34;%s%s&amp;#34; $ChangeId ( .Changed.FileChanges | toString ) -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{- $ChangeId = printf &amp;#34;%s%s&amp;#34; $ChangeId ( .Changed.Objects | toString ) -}}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> {{- $ChangeId = printf &amp;#34;%s%s&amp;#34; $ChangeId ( .Changed.Changes | toString ) }}
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0;font-style:italic"> Change-Id: {{ printf &amp;#34;I%s&amp;#34; ( sha256sum $ChangeId | trunc 40 ) }}&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>auto&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">refspec&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>refs/heads/auto:refs/heads/main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This instructs the image-automation-controller to clone the repository using the
&lt;code>main&lt;/code> branch but execute its update logic and commit with the provided message
template on the &lt;code>auto&lt;/code> branch. Commits are then pushed to the &lt;code>auto&lt;/code> branch,
followed by pushing the &lt;code>HEAD&lt;/code> of the &lt;code>auto&lt;/code> branch to the &lt;code>HEAD&lt;/code> of the remote
&lt;code>main&lt;/code> branch. The message template ensures the inclusion of a
&lt;a href="https://gerrit-review.googlesource.com/Documentation/concept-changes.html#change-id" target="_blank">Change-Id&lt;/a>
at the bottom of the commit message.&lt;/p>
&lt;p>The initial branch push aims to prevent multiple
&lt;a href="https://gerrit-review.googlesource.com/Documentation/concept-patch-sets.html" target="_blank">Patch Sets&lt;/a>.
If we exclude &lt;code>.push.branch&lt;/code> and only specify
&lt;code>.push.refspec: refs/heads/main:refs/heads/main&lt;/code>, the desired
&lt;a href="https://gerrit-review.googlesource.com/Documentation/concept-changes.html" target="_blank">Change&lt;/a>
can be created as intended. However, when the controller freshly clones the
&lt;code>main&lt;/code> branch while a Change is open, it executes its update logic on &lt;code>main&lt;/code>,
leading to new commits being pushed with the same changes to the existing open
Change. Specifying &lt;code>.push.branch&lt;/code> circumvents this by instructing the controller
to apply the update logic to the &lt;code>auto&lt;/code> branch, already containing the desired
commit. This approach is also recommended in the
&lt;a href="https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html#create-change" target="_blank">Gerrit documentation&lt;/a>.&lt;/p>
&lt;p>Another thing to note is the syntax of &lt;code>.push.refspec&lt;/code>. Instead of it being
&lt;code>HEAD:refs/for/main&lt;/code>, commonly used by Gerrit users, we specify the full
refname &lt;code>refs/heads/auto&lt;/code> in the source part of the refpsec.&lt;/p>
&lt;p>&lt;strong>Note:&lt;/strong> A known limitation of using the image-automation-controller with
Gerrit involves handling multiple concurrent Changes. This is due to the
calculation of the Change-Id, relying on factors like file names and image
tags. If the controller introduces a new file or modifies a previously updated
image tag to a different one, it leads to a distinct Change-Id for the commit.
Consequently, this action will trigger the creation of an additional Change,
even when an existing Change containing outdated modifications remains open.&lt;/p>
&lt;h4 id="gitea">Gitea&lt;/h4>
&lt;p>
&lt;a href="https://docs.gitea.com/usage/agit" target="_blank">Gitea&lt;/a> and
&lt;a href="https://forgejo.org/docs/latest/user/agit-support/" target="_blank">Forgejo&lt;/a> each implement the AGit-Workflow.
This means, the image-automation-controller is able to open a pull-request by
pushing to a &lt;code>refspec&lt;/code> like &lt;code>HEAD:refs/for/main&lt;/code> with the apropriate
&lt;a href="#push-options">push-options&lt;/a>.&lt;/p>
&lt;p>The following example opens a PR on a Gitea or Forgejo-Server:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#062873;font-weight:bold">apiVersion&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>image.toolkit.fluxcd.io/v1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">kind&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ImageUpdateAutomation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb">&lt;/span>&lt;span style="color:#062873;font-weight:bold">metadata&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>my-automation&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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">git&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">checkout&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">ref&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">branch&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">push&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>flux-updates&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">refspec&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>refs/heads/flux-updates:refs/for/main&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">options&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">topic&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux-updates&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">title&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>Flux Image Update&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">description&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"> This PR is automatically opened by the fluxcd *image-automation-controller*&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">commit&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">author&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">email&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>flux@eaample.com&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>fluxcd&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">messageTemplate&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#4070a0">&amp;#39;{{range .Changed.Changes}}{{print .OldValue}} -&amp;gt; {{println
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4070a0"> .NewValue}}{{end}}&amp;#39;&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="imageupdateautomation-status">ImageUpdateAutomation Status&lt;/h2>
&lt;h3 id="observed-policies">Observed Policies&lt;/h3>
&lt;p>The ImageUpdateAutomation reports the observed image policies that were
considered during the image update in the &lt;code>.status.observedPolicies&lt;/code> field. It
is a map of the policy name and its latest image name and tag.&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">observedPolicies&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">podinfo-policy&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">name&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>ghcr.io/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">tag&lt;/span>:&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#40a070">4.0.6&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">myapp1&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ghcr.io/fluxcd/myapp1&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#40a070">4.0.0&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>&lt;span style="color:#062873;font-weight:bold">myapp2&lt;/span>:&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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>ghcr.io/fluxcd/myapp2&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&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:#40a070">2.0.0&lt;/span>&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bbb"> &lt;/span>...&lt;span style="color:#bbb">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The observed policies keep track of the policies considered in the last
reconciliation and is used to determine if the reconciliation can skip full
execution due to no change in image policies or remote source.&lt;/p>
&lt;h3 id="observed-source-revision">Observed Source Revision&lt;/h3>
&lt;p>The ImageUpdateAutomation reports the observed source revision that was checked
out during the image update in the &lt;code>.status.observedSourceRevision&lt;/code> field. For a
GitRepository, the observed source revision would contain the branch name and
the commit hash; e.g., &lt;code>main@sha1:8084f1bb180ac259c6698cd027064b7dce86a72a&lt;/code>.
If the checkout and push branchs are the same, the commit hash of the observed
source revision is equal to the
&lt;a href="#last-push-commit">last push commit&lt;/a>.&lt;/p>
&lt;p>The observed source revision keeps track of the source revision seen in the last
reconciliation and is used to determine if the reconciliation can skip full
execution due to no change in image policies or remote source.&lt;/p>
&lt;h3 id="last-automation-run-time">Last Automation Run Time&lt;/h3>
&lt;p>The ImageUpdateAutomation reports the last automation run time in the
&lt;code>.status.lastAutomationRunTime&lt;/code> field. It is a timestamp of when the
reconciliation ran the last time, regardless of any effective resulting update.&lt;/p>
&lt;h3 id="last-push-commit">Last Push Commit&lt;/h3>
&lt;p>The ImageUpdateAutomation reports the last pushed commit for image update in the
&lt;code>.status.lastPushCommit&lt;/code> field. It is the commit hash of the last pushed commit.
The commit has may not be the same that&amp;rsquo;s present in the observed source
revision if the puch branch is different from the checkout branch or the remote
repository has new commits which didn&amp;rsquo;t result in an image update.&lt;/p>
&lt;h3 id="last-push-time">Last Push Time&lt;/h3>
&lt;p>The ImageUpdateAutomation reports the last pushed commit time for image update
in the &lt;code>.status.lastPushTime&lt;/code> field. It is a timestamp of when the last image
update resulted in a pushing of new commit to the source.&lt;/p>
&lt;h3 id="conditions">Conditions&lt;/h3>
&lt;p>An ImageUpdateAutomation 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-imageupdateautomation">reconciling&lt;/a> while checking out
and updating images in source, it can be
&lt;a href="#ready-imageupdateautomation">ready&lt;/a>,
or it can
&lt;a href="#failed-imageupdateautomation">fail during reconciliation&lt;/a>.&lt;/p>
&lt;p>The ImageUpdateAutomation 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 ImageUpdateAutomation to
become &lt;code>Ready&lt;/code>.&lt;/p>
&lt;h4 id="reconciling-imageupdateautomation">Reconciling ImageUpdateAutomation&lt;/h4>
&lt;p>The image-automation-controller marks an ImageUpdateAutomation as &lt;em>reconciling&lt;/em>
when one of the following is true:&lt;/p>
&lt;ul>
&lt;li>The generation of the ImageUpdateAutomation is newer than the
&lt;a href="#observed-generation">Observed
Generation&lt;/a>.&lt;/li>
&lt;li>The ImageUpdateAutomation has observed new ImagePolicies or changes in the
ImagePolicies&amp;rsquo; latest images, or change in the remote source.&lt;/li>
&lt;/ul>
&lt;p>When the ImageUpdateAutomation is &amp;ldquo;reconciling&amp;rdquo;, the &lt;code>Ready&lt;/code> Condition status
becomes &lt;code>Unknown&lt;/code>, and the controller adds a Condition with the following
attributes to the ImageUpdateAutomation&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;/li>
&lt;/ul>
&lt;p>It 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 ImageUpdateAutomation while its status value is &lt;code>&amp;quot;True&amp;quot;&lt;/code>.&lt;/p>
&lt;h4 id="ready-imageupdateautomation">Ready ImageUpdateAutomation&lt;/h4>
&lt;p>The image-automation-controller marks an ImageUpdateAutomation as &lt;em>ready&lt;/em> when
it has the following characteristics:&lt;/p>
&lt;ul>
&lt;li>The controller was able to check out the remote source repository using the
specified GitRepository configurations.&lt;/li>
&lt;li>The ImageUpdateAutomation could not find any update to the source, already
up-to-date.&lt;/li>
&lt;li>The ImageUpdateAutomation pushes image updates to the source, making it
up-to-date.&lt;/li>
&lt;/ul>
&lt;p>When the ImageUpdateAutomation is &amp;ldquo;ready&amp;rdquo;, the controller sets a Condition with the
following attributes in the ImageUpdateAutomation&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 a
&lt;a href="#failed-imageupdateautomation">failure&lt;/a> occurs due to any reason.&lt;/p>
&lt;h4 id="failed-imageupdateautomation">Failed ImageUpdateAutomation&lt;/h4>
&lt;p>The image-automation-controller may get stuck trying to update a source without
completing. This can occur due to some of the following factors:&lt;/p>
&lt;ul>
&lt;li>The remote source is temporarily unavailable.&lt;/li>
&lt;li>The referenced source is in a different namespace and cross-namespace
reference is disabled.&lt;/li>
&lt;li>The referenced source does not exist.&lt;/li>
&lt;li>The credentials associated with the source are invalid.&lt;/li>
&lt;li>The source configuration is invalid for the current state of the source, for
example, the specified branch does not exists in the remote source repository.&lt;/li>
&lt;li>The remote source repository prevents push or creation of new push branch.&lt;/li>
&lt;li>The policy selector is invalid, for example, label is too long.&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>
with the following reasons:&lt;/p>
&lt;ul>
&lt;li>&lt;code>reason: AccessDenied&lt;/code> | &lt;code>reason: InvalidSourceConfiguration&lt;/code> | &lt;code>reason: GitOperationFailed&lt;/code> | &lt;code>reason: UpdateFailed&lt;/code> | &lt;code>reason: InvalidPolicySelector&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>While the ImageUpdateAutomation is in failing state, the controller will
continue to attempt to update the source with an exponential backoff, until it
succeeds and the ImageUpdateAutomation is marked as
&lt;a href="#ready-imageupdateautomation">ready&lt;/a>.&lt;/p>
&lt;p>Note that an ImageUpdateAutomation can be
&lt;a href="#reconciling-imageupdateautomation">reconciling&lt;/a>
while failing at the same time, for example due to a newly introduced
configuration issue in the ImageUpdateAutomation spec.&lt;/p>
&lt;h3 id="observed-generation">Observed Generation&lt;/h3>
&lt;p>The image-automation-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 ImageUpdateAutomation&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-imageupdateautomation">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 image-automation-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></channel></rss>