Skip to content

feat: sync default component images from upstream Supabase - #16

Merged
STRRL merged 1 commit into
masterfrom
feat/sync-upstream-images
Jul 23, 2026
Merged

feat: sync default component images from upstream Supabase#16
STRRL merged 1 commit into
masterfrom
feat/sync-upstream-images

Conversation

@STRRL

@STRRL STRRL commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Problem

Default component image versions live in two places, the webhook constants and the kubebuilder CRD markers, and they have drifted apart. CRD schema defaults apply before the mutating webhook, so the stale marker values are what actually take effect. There is also no process for following upstream Supabase version updates.

Solution

Consolidate image defaults into api/v1alpha1 as the single source of truth, and add a weekly GitHub Actions job that syncs versions from the upstream docker compose file and opens a PR gated by the existing e2e suite.

Major Changes

  • Image defaults consolidation
    • New api/v1alpha1/wellknown_images.go holds all default image constants; webhook and component builders reference it, removing the internal/component dependency on internal/webhook
    • CRD markers and generated schema now match the newer webhook values (gotrue v2.177.0 to v2.180.0, postgrest v12.2.12 to v13.0.7, realtime v2.34.47 to v2.51.11, storage api v1.25.7 to v1.32.0, meta v0.91.0 to v0.93.1)
  • Upstream sync mechanism
    • hack/sync-upstream-images.sh parses the upstream compose file and rewrites both the constants and the markers; the db service is intentionally excluded since the operator requires user provided PostgreSQL
    • .github/workflows/sync-upstream-images.yaml runs weekly, regenerates CRDs, runs make test, and opens a PR via peter-evans/create-pull-request

Note: configure a SYNC_UPSTREAM_TOKEN PAT secret so CI triggers on the auto created PRs; the default GITHUB_TOKEN cannot trigger other workflows. The first auto PR will propose large jumps (Kong 2.8 to 3.9 among others), which is exactly what the e2e gate is for.

Consolidate default image constants into api/v1alpha1 as single
source of truth. Webhook defaults and kubebuilder markers were
already out of sync (gotrue v2.180.0 vs v2.177.0). CRD schema
defaults apply before the mutating webhook, so the stale marker
values silently won.

Add hack/sync-upstream-images.sh and a weekly workflow that pulls
versions from upstream docker-compose.yml and opens a PR gated by
the existing e2e suite.
@STRRL
STRRL marked this pull request as ready for review July 23, 2026 06:19
@STRRL
STRRL merged commit 358f551 into master Jul 23, 2026
3 checks passed
@STRRL
STRRL deleted the feat/sync-upstream-images branch July 23, 2026 06:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92cfaf4f2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +83 to +85
if [ "$old_image" = "$new_image" ]; then
echo " = ${service}: ${old_image} (up to date)"
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reconcile markers even when constants match upstream

When a constant already matches the upstream compose image, this branch skips update_marker, so a stale kubebuilder default marker/CRD can remain stale and the script will still report the service as up to date. That recreates the drift this change is meant to prevent: for resources where Kubernetes applies the CRD default before the webhook, users continue to get the marker value rather than the constant. Consider checking and updating the marker independently of whether the Go constant changed.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant