Skip to content

fix(deploy): pull production MinIO from Chainguard's free images - #52

Draft
wiggdevin wants to merge 6 commits into
zs/mainfrom
fix/minio-prod-chainguard
Draft

wiggdevin wants to merge 6 commits into
zs/mainfrom
fix/minio-prod-chainguard

Conversation

@wiggdevin

@wiggdevin wiggdevin commented Oct 10, 2026 •

Copy link
Copy Markdown

minio/minio and minio/mc left Docker Hub and Quay, so production Compose and the chart quickstart now pull Chainguard's free MinIO images, pinned by digest.

Commits

  • fix(deploy): pull production MinIO from Chainguard's free images
  • fix(deploy): hand old root-owned MinIO data to the nonroot image
  • fix(deploy): make the MinIO ownership hand-over idempotent and optional
  • fix(deploy): fail the MinIO ownership hand-over when /data cannot be scanned

Review

Audited by GPT-6.1 Sol, Grok and Opus. Verified findings were fixed in the last two commits:

  • Compose reran chown -R on every up while MinIO served. A file deleted mid-walk failed the step and kept the relay down. The step now skips when ownership is already right and tolerates vanishing files.
  • The chart walked the full volume on every reschedule and had no opt-out for NFS root_squash or PSA-restricted namespaces. It now uses the same guard, plus minio.fixDataOwnership and minio.podSecurityContext (with fsGroupChangePolicy: OnRootMismatch).
  • A Sol re-review found the guard treated a failed scan as "already migrated". It now fails on any find error except files that vanished mid-walk. The image's find is BusyBox, so this parses find's error lines rather than its exit code.
  • Superseded free-tier digests are not retained. Renovate now bumps cgr.dev/chainguard/** weekly and never automerges.

Grok's BLOCK (the image CMD appended to the chown entrypoint) and its wget-HSTS and mc config concerns were checked against the images and do not apply. The images have an empty CMD and $HOME is writable by uid 65532.

Test plan

  • Compose, real containers: a root-owned volume migrates; a rerun on a migrated volume skips; reruns under concurrent renames exit 0 (migration and skip paths); an unreadable /data exits 1 with the find error; MinIO reports healthy and bucket init succeeds.
  • helm v3.16.4 + helm-unittest 0.8.2: 49/49 tests; lint and every fixture render are clean.
  • Renovate config validator passes.

Not verified: whether data written by upstream RELEASE.2025-09-07 opens cleanly in RELEASE.2026-09-22. The old image can no longer be pulled. Back up buzz-minio-data before upgrading a live server.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

minio/minio and minio/mc are gone from Docker Hub and Quay, so the Helm chart
and deploy/compose pins no longer pull. Use cgr.dev/chainguard/minio and
minio-client (free, latest-dev pinned by digest; -dev carries the /bin/sh the
init steps run). The image runs as uid 65532 and has wget but no curl, so the
compose healthcheck uses wget and the chart's MinIO pod sets fsGroup 65532.

Tested: deploy/compose minio + minio-init (bucket private, write/read ok);
chart quickstart render, then MinIO Deployment, init Job and the relay's
wait-for-bucket step on Kubernetes with a PVC.

Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
Sol review: volumes written by the root-run minio/minio image are root-owned,
so the uid-65532 Chainguard image could not write them after an upgrade, and
fsGroup does not fix hostPath PVCs. Add a one-shot root chown before MinIO
starts (compose service minio-perms, chart initContainer data-ownership).
Tested: data written by a root-run MinIO stays readable and new writes work.

Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 10, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 13, 2026
@wiggdevin
wiggdevin removed this pull request from the merge queue due to a manual request Oct 13, 2026
Review of the Chainguard MinIO switch (GPT-6.1 Sol, Grok, Opus) found the
root chown hand-over unsafe on reruns:

- compose: `up`/`run.sh restart` reruns minio-perms while MinIO serves. A
  file deleted mid-walk made `chown -R` exit non-zero and the relay never
  started. The step now skips the walk when nothing under /data is left to
  hand over, tolerates vanishing files, and fails only when ownership is
  still wrong afterwards. It runs with no network and a com.buzz label.
- chart: the same guard in the data-ownership initContainer, so a
  reschedule costs one find instead of a full-tree walk. New
  minio.fixDataOwnership (default true) drops the root initContainer for
  NFS root_squash storage and PSA-restricted namespaces;
  minio.podSecurityContext makes the pod context configurable and adds
  fsGroupChangePolicy: OnRootMismatch.
- renovate: weekly, never-automerged digest bumps for cgr.dev/chainguard,
  since superseded free-tier digests are not retained.
- ARCHITECTURE.md: MinIO image row now covers compose and the chart.
- helm-unittest: default hand-over and the opt-out path.

Verified locally: compose run on a root-owned volume (migrates), rerun on
a migrated volume (skips), rerun under concurrent deletes (exit 0), MinIO
healthy and bucket init OK; helm unittest 49/49, lint and every fixture
render clean with helm v3.16.4 + helm-unittest 0.8.2.

Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
…scanned

Re-review (GPT-6.1 Sol) found the guard treated a failed find as "nothing
left to hand over": on root-squashed NFS with a 0700 /data, the root step
could not enumerate legacy root-owned files and exited 0, leaving MinIO on
unreadable data.

The image's find is BusyBox, which has no -ignore_readdir_race and exits
non-zero on entries that vanish mid-walk. The guard now reads find's error
lines instead of its exit code: "No such file or directory" (files removed
while MinIO serves) is tolerated, any other error fails the step with the
find message.

Verified with real containers: migration under concurrent renames, reruns
on a migrated volume with and without churn (skip path), MinIO healthy,
and an unreadable /data (root without DAC caps) now exits 1 with
"cannot scan /data: Permission denied". helm unittest 49/49, lint and all
fixture renders clean; the rendered chart script migrates a root-owned
volume in the image.

Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
Review fixes (Sol: no findings above NIT; Argon: 1 BLOCK, 4 WARN, verified):
- chown -Rh so root-owned symlinks in /data are re-owned, not followed
  (compose minio-perms and chart data-ownership initContainer).
- README: stop relay and minio and back up the volume before the first
  upgrade, because minio-perms must not run beside the old root-run
  container (compose starts dependencies before it stops the old one).
- renovate: customManager for minio.mcImage, which the helm-values
  manager does not read, so its digest is refreshed with the minio image.
- Record the minio RELEASE behind each digest; correct ARCHITECTURE.md
  (dev and CI compose files track latest-dev) and the PSA/OpenShift
  comment in values.yaml.

Signed-off-by: wiggdevin <202901685+wiggdevin@users.noreply.github.com>
@wiggdevin wiggdevin closed this Oct 28, 2026
@wiggdevin wiggdevin reopened this Oct 28, 2026
@wiggdevin
wiggdevin marked this pull request as draft October 28, 2026 03:44
@wiggdevin
wiggdevin marked this pull request as ready for review October 28, 2026 03:45
@wiggdevin
wiggdevin marked this pull request as draft October 28, 2026 03:52
@wiggdevin
wiggdevin marked this pull request as ready for review October 28, 2026 03:52
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 31, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Oct 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 31, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 1, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 1, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 2, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 5, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 6, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 6, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 7, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 8, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 8, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@wiggdevin
wiggdevin added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@wiggdevin
wiggdevin marked this pull request as draft November 10, 2026 23:28
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