Repository navigation
Add spec.policyChangeDelay to batch image updates - #1112
Merged
Merged
Conversation
stefanprodan
force-pushed
the
policy-change-delay
branch
from
October 24, 2026 10:13
7e83c76 to
46d7740
Compare
spec.policyChangeDelay to batch image updates
The field defers the run triggered by an ImagePolicy change so that a burst of image updates is committed together. Signed-off-by: Stefan Prodan <[email protected]>
The fake recorder blocks once its 32-event buffer is full because no test drains it, which stalls the reconciler in later tests. Signed-off-by: Stefan Prodan <[email protected]>
When spec.policyChangeDelay is set, ImagePolicy changes enqueue the automation after the delay, so image updates arriving within it are committed together. Only automations that select the policy (old or new labels) or have observed it are enqueued. Without the delay, every automation in the namespace is enqueued immediately, as before. Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
stefanprodan
force-pushed
the
policy-change-delay
branch
from
October 24, 2026 10:48
46d7740 to
03edf11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
.spec.policyChangeDelaytoImageUpdateAutomation. When set, anImagePolicychange enqueues the automation after the delay instead of immediately, so image updates arriving within the delay go into one commit. The delay starts at the first change and is not extended by later ones. The interval, spec changes, GitRepository changes and manual reconcile requests are not delayed.This new field respects
.spec.policySelector. If both are set, only ImagePolicy changes for policies selected by.spec.policySelectortrigger a run.Example:
Without the delay, behaviour is unchanged: every automation in the namespace runs as soon as any policy triggers them.
Fixes #313
xref: fluxcd/flux2#2461