feat(images): resolve component imgs at reconcile time; paced fleet rollout - #556
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Verolop
marked this pull request as draft
August 2, 2026 08:38
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Verolop
force-pushed
the
feat/dynamic-component-images
branch
2 times, most recently
from
August 19, 2026 16:33
5ed6b6d to
4e8d0b3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Verolop
marked this pull request as ready for review
August 19, 2026 16:41
|
✅ E2E tests success — View run |
The defaulting webhook wrote default images into spec.images at admission. This commit adds an images package that owns them instead. Clusters that already have values there keep running them, unchanged. - Frozen images meant every cluster stayed on whatever versions it was created with, and moving the fleet meant patching each one by hand. - Once in the spec, an operator-written image looks the same as a pin the user set on purpose, so nothing can safely update it. Signed-off-by: Verónica López <veronica.lopez@supabase.io>
spec.imageUpdatePolicy gets a strategy field so one cluster can be frozen or advanced independently of the operator's fleet-wide default. - A single flag on the operator can't isolate one project during a maintenance window without moving the whole fleet with it. Signed-off-by: Verónica López <veronica.lopez@supabase.io>
The reconciler fills unset images from operator config on every pass, and explicit values in the spec still win. Adds a lazy mode that keeps a cluster on its current images until the acknowledged revision in the spec says it can move. - Without lazy mode, changing operator config would restart every cluster at once, because reconciles run constantly for unrelated reasons. - The control plane then moves one spec field per project instead of six image values it would have to look up itself. Signed-off-by: Verónica López <veronica.lopez@supabase.io>
… pinned - add status.images.effective and status.images.source so each cluster reports the complete image set rendered into children and whether it comes from explicit pins, operator defaults, or a mix. - when all six component images are explicitly pinned, the cluster no longer participates in operator-default resolution: the applied-images annotation is removed once on the transition so stale defaults cannot resurface on a later unpin, and steady-state reconciles do no default image API, event, or log work. ImageRolloutPending reports False with reason FullyPinned in that state. - fix tracking-label and applied-images patches to write through a copy so the API response cannot discard in-memory defaults computed earlier in the same reconcile pass. Signed-off-by: Verónica López <veronica.lopez@supabase.io>
- make lazy image state fail-safe by reporting the applied and available sets, preserving fully pinned transitions with a tombstone, and stopping when recorded state is invalid with no status fallback. Immediate mode still adopts current defaults. - use Recreate and clear the server-defaulted rollingUpdate field so old and new webhook versions are never served together. Signed-off-by: Verónica López <veronica.lopez@supabase.io>
Verolop
force-pushed
the
feat/dynamic-component-images
branch
from
August 19, 2026 21:37
4e8d0b3 to
26bfbd3
Compare
🔬 Go Test Coverage ReportSummary
Status✅ PASS DetailShow New Coverage |
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.
Description
this PR resolves component images at reconcile time instead of freezing them into the spec when a cluster is created.
Today the webhook writes the current images into
spec.images, where they are indistinguishable from deliberate pins and never change again. A cluster stays on the images it was created with, and updating several means editing each one by hand. Now unset images come from the operator's configuration on every reconcile, and anything set in the spec stays a pin.The defaults are also no longer fixed at build time.
MULTIGRES_IMAGE_*on the operator Deployment overrides them per component, so a deployment can run its own images without patchingimage_defaults.go.Main changes
MULTIGRES_IMAGE_*deployment-level overrides for the default set, documented indocs/configuration.md.--image-update-strategy=lazyholds a cluster on its current images untilspec.imageUpdatePolicy.acknowledgedRevisionnames the new set, so clusters update one at a time. Default staysimmediate.Recreateso old and new webhook behavior are never served together.Testing
Unit tests cover default resolution, explicit and partial pins, lazy adoption, bad acknowledgements, corrupt records, and status fallback. The reconcile test checks images on child resources before and after acknowledgement. e2e is green.