From 82a9b7fc2ae210cc459b26a8a3c02f89d8775781 Mon Sep 17 00:00:00 2001 From: wiggdevin <202901685+wiggdevin@users.noreply.github.com> Date: Sat, 10 Oct 2026 13:29:17 -0700 Subject: [PATCH 1/5] fix(deploy): pull production MinIO from Chainguard's free images 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> --- deploy/charts/buzz/templates/quickstart-minio.yaml | 2 ++ deploy/charts/buzz/values.yaml | 7 +++++-- deploy/compose/compose.yml | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/deploy/charts/buzz/templates/quickstart-minio.yaml b/deploy/charts/buzz/templates/quickstart-minio.yaml index 9685a7ff34e..c44de78eb9e 100644 --- a/deploy/charts/buzz/templates/quickstart-minio.yaml +++ b/deploy/charts/buzz/templates/quickstart-minio.yaml @@ -28,6 +28,8 @@ spec: {{- include "buzz.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: minio spec: + securityContext: + fsGroup: 65532 # the Chainguard MinIO image runs as nonroot (uid 65532) containers: - name: minio image: {{ .Values.minio.image | quote }} diff --git a/deploy/charts/buzz/values.yaml b/deploy/charts/buzz/values.yaml index 6c57a5c8ac9..7f04a805c9c 100644 --- a/deploy/charts/buzz/values.yaml +++ b/deploy/charts/buzz/values.yaml @@ -367,8 +367,11 @@ s3: # this disabled and use s3.* (or secrets.existingSecret) against managed S3. minio: enabled: false # quickstart: set true for bundled in-cluster MinIO - image: minio/minio:RELEASE.2025-09-07T16-13-09Z - mcImage: minio/mc:RELEASE.2025-08-13T08-35-41Z + # minio/minio and minio/mc left Docker Hub and Quay. Chainguard's free images + # (latest tags only) are pinned by digest; -dev variants carry the /bin/sh the + # init job needs. They run as uid 65532 (see quickstart-minio fsGroup). + image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 + mcImage: cgr.dev/chainguard/minio-client:latest-dev@sha256:2d11d09801b035510cb0c2ff0c64aa016fc94f0c4e7055a31ec17cf41dd154cb persistence: enabled: true size: 10Gi diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index 15337c92a27..84ee8c6bbae 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -85,7 +85,7 @@ services: - buzz-net minio: - image: minio/minio:RELEASE.2025-09-07T16-13-09Z + image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 # minio/minio left Docker Hub; -dev adds sh and wget command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: ${BUZZ_S3_ACCESS_KEY:?set BUZZ_S3_ACCESS_KEY} @@ -93,7 +93,7 @@ services: volumes: - buzz-minio-data:/data healthcheck: - test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"] + test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:9000/minio/health/live"] interval: 5s timeout: 5s retries: 12 @@ -103,7 +103,7 @@ services: - buzz-net minio-init: - image: minio/mc:RELEASE.2025-08-13T08-35-41Z + image: cgr.dev/chainguard/minio-client:latest-dev@sha256:2d11d09801b035510cb0c2ff0c64aa016fc94f0c4e7055a31ec17cf41dd154cb depends_on: minio: condition: service_healthy From 2e64893de3f3effc0e500217c4c039728e8e2ef6 Mon Sep 17 00:00:00 2001 From: wiggdevin <202901685+wiggdevin@users.noreply.github.com> Date: Sat, 10 Oct 2026 13:34:05 -0700 Subject: [PATCH 2/5] fix(deploy): hand old root-owned MinIO data to the nonroot image 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> --- deploy/charts/buzz/templates/quickstart-minio.yaml | 11 +++++++++++ deploy/compose/compose.yml | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/deploy/charts/buzz/templates/quickstart-minio.yaml b/deploy/charts/buzz/templates/quickstart-minio.yaml index c44de78eb9e..373a3ad81e3 100644 --- a/deploy/charts/buzz/templates/quickstart-minio.yaml +++ b/deploy/charts/buzz/templates/quickstart-minio.yaml @@ -30,6 +30,17 @@ spec: spec: securityContext: fsGroup: 65532 # the Chainguard MinIO image runs as nonroot (uid 65532) + initContainers: + # Volumes written by the old root-run minio/minio image are root-owned, + # and fsGroup does not fix hostPath-backed PVCs. Hand them over once. + - name: data-ownership + image: {{ .Values.minio.image | quote }} + command: ["chown", "-R", "65532:65532", "/data"] + securityContext: + runAsUser: 0 + runAsNonRoot: false + volumeMounts: + - { name: data, mountPath: /data } containers: - name: minio image: {{ .Values.minio.image | quote }} diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index 84ee8c6bbae..0867d561839 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -84,9 +84,22 @@ services: networks: - buzz-net + # The Chainguard MinIO image runs as uid 65532; volumes written by the old + # root-run minio/minio image are root-owned. Hand them over once before start. + minio-perms: + image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 + user: "0:0" + entrypoint: ["chown", "-R", "65532:65532", "/data"] + volumes: + - buzz-minio-data:/data + restart: "no" + minio: image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 # minio/minio left Docker Hub; -dev adds sh and wget command: server /data --console-address ":9001" + depends_on: + minio-perms: + condition: service_completed_successfully environment: MINIO_ROOT_USER: ${BUZZ_S3_ACCESS_KEY:?set BUZZ_S3_ACCESS_KEY} MINIO_ROOT_PASSWORD: ${BUZZ_S3_SECRET_KEY:?set BUZZ_S3_SECRET_KEY} From cf5adc864ea8a72e383a6384f7a68e2a311a4ccc Mon Sep 17 00:00:00 2001 From: wiggdevin <202901685+wiggdevin@users.noreply.github.com> Date: Tue, 13 Oct 2026 15:15:10 -0700 Subject: [PATCH 3/5] fix(deploy): make the MinIO ownership hand-over idempotent and optional 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> --- ARCHITECTURE.md | 2 +- .../buzz/templates/quickstart-minio.yaml | 23 +++++++-- .../buzz/tests/quickstart_bundled_test.yaml | 47 +++++++++++++++++++ deploy/charts/buzz/values.schema.json | 2 + deploy/charts/buzz/values.yaml | 11 +++++ deploy/compose/compose.yml | 20 +++++++- renovate.json | 8 ++++ 7 files changed, 107 insertions(+), 6 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 6ffdf4a81b0..5a393fc55ba 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -783,7 +783,7 @@ Docker Compose provides the full local development stack. All services include h | Postgres | `postgres:17-alpine` | 5432 | Primary event store — events, channels, tokens, workflows, audit; full-text search (`search_tsv` GIN) | | Redis | `redis:7-alpine` | 6379 | Pub/sub fan-out, presence (SET EX), typing (sorted sets) | | Adminer | `adminer` | 8082 | DB web UI (dev only) | -| MinIO | `cgr.dev/chainguard/minio` (dev/CI) | 9000 (API), 9001 (console) | S3-compatible object storage (media) | +| MinIO | `cgr.dev/chainguard/minio:latest-dev` (digest-pinned; dev, CI, `deploy/compose`, chart quickstart) | 9000 (API), 9001 (console) | S3-compatible object storage (media) | | Prometheus | `prom/prometheus` | 9090 | Metrics collection | ### Postgres Schema (key tables) diff --git a/deploy/charts/buzz/templates/quickstart-minio.yaml b/deploy/charts/buzz/templates/quickstart-minio.yaml index 373a3ad81e3..5ec4a2fa1a1 100644 --- a/deploy/charts/buzz/templates/quickstart-minio.yaml +++ b/deploy/charts/buzz/templates/quickstart-minio.yaml @@ -28,19 +28,36 @@ spec: {{- include "buzz.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: minio spec: + {{- with .Values.minio.podSecurityContext }} securityContext: - fsGroup: 65532 # the Chainguard MinIO image runs as nonroot (uid 65532) + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.minio.fixDataOwnership }} initContainers: # Volumes written by the old root-run minio/minio image are root-owned, - # and fsGroup does not fix hostPath-backed PVCs. Hand them over once. + # and fsGroup does not fix hostPath-backed PVCs. Hand them over to the + # nonroot uid. The walk is skipped once nothing is left to change, so a + # reschedule costs one find; files that vanish mid-walk are tolerated + # and only ownership still wrong afterwards fails the pod. - name: data-ownership image: {{ .Values.minio.image | quote }} - command: ["chown", "-R", "65532:65532", "/data"] + command: + - /bin/sh + - -c + - | + stale() { find /data -xdev ! -user 65532 -print -quit 2>/dev/null; } + [ -z "$(stale)" ] && exit 0 + chown -R 65532:65532 /data || true + left="$(stale)" + [ -z "$left" ] && exit 0 + echo "data-ownership: $left is not owned by 65532 (set minio.fixDataOwnership=false if the storage rejects root chown)" >&2 + exit 1 securityContext: runAsUser: 0 runAsNonRoot: false volumeMounts: - { name: data, mountPath: /data } + {{- end }} containers: - name: minio image: {{ .Values.minio.image | quote }} diff --git a/deploy/charts/buzz/tests/quickstart_bundled_test.yaml b/deploy/charts/buzz/tests/quickstart_bundled_test.yaml index ecb7877e9f0..796bf9d1463 100644 --- a/deploy/charts/buzz/tests/quickstart_bundled_test.yaml +++ b/deploy/charts/buzz/tests/quickstart_bundled_test.yaml @@ -88,3 +88,50 @@ tests: path: spec.selector["app.kubernetes.io/component"] value: relay template: templates/service.yaml + + # The Chainguard image runs as uid 65532; volumes from the old root-run + # minio/minio image need a root ownership hand-over, which some storage + # (NFS root_squash) and namespaces (PSA restricted) refuse. + - it: hands a root-owned MinIO volume to uid 65532 by default + release: + name: rel + set: + relayUrl: wss://buzz.example.com + ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000" + postgresql.enabled: true + redis.enabled: true + minio.enabled: true + template: templates/quickstart-minio.yaml + documentIndex: 0 + asserts: + - equal: + path: spec.template.spec.securityContext + value: { fsGroup: 65532, fsGroupChangePolicy: OnRootMismatch } + - equal: + path: spec.template.spec.initContainers[0].name + value: data-ownership + - equal: + path: spec.template.spec.initContainers[0].securityContext.runAsUser + value: 0 + - matchRegex: + path: spec.template.spec.initContainers[0].command[2] + pattern: "chown -R 65532:65532 /data" + + - it: drops the root init container when minio.fixDataOwnership=false + release: + name: rel + set: + relayUrl: wss://buzz.example.com + ownerPubkey: "0000000000000000000000000000000000000000000000000000000000000000" + postgresql.enabled: true + redis.enabled: true + minio.enabled: true + minio.fixDataOwnership: false + minio.podSecurityContext: null + template: templates/quickstart-minio.yaml + documentIndex: 0 + asserts: + - notExists: + path: spec.template.spec.initContainers + - notExists: + path: spec.template.spec.securityContext diff --git a/deploy/charts/buzz/values.schema.json b/deploy/charts/buzz/values.schema.json index aaab848fd33..4ea251a176d 100644 --- a/deploy/charts/buzz/values.schema.json +++ b/deploy/charts/buzz/values.schema.json @@ -224,6 +224,8 @@ "enabled": { "type": "boolean" }, "image": { "type": "string", "minLength": 1 }, "mcImage": { "type": "string", "minLength": 1 }, + "fixDataOwnership": { "type": "boolean" }, + "podSecurityContext": { "type": ["object", "null"] }, "persistence": { "type": "object", "additionalProperties": false, diff --git a/deploy/charts/buzz/values.yaml b/deploy/charts/buzz/values.yaml index 7f04a805c9c..ba5aa5feeba 100644 --- a/deploy/charts/buzz/values.yaml +++ b/deploy/charts/buzz/values.yaml @@ -372,6 +372,17 @@ minio: # init job needs. They run as uid 65532 (see quickstart-minio fsGroup). image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 mcImage: cgr.dev/chainguard/minio-client:latest-dev@sha256:2d11d09801b035510cb0c2ff0c64aa016fc94f0c4e7055a31ec17cf41dd154cb + # Root initContainer that hands a root-owned volume (written by the old + # minio/minio image) to uid 65532 before MinIO starts; it skips the walk once + # ownership is right. Set false when the storage rejects root chown (NFS + # root_squash) or the namespace forbids root pods (PSA restricted, OpenShift + # restricted-v2); the volume must then already be writable by uid 65532. + fixDataOwnership: true + # Pod securityContext for MinIO. OpenShift restricted-v2 assigns its own + # fsGroup range: set this to null there ({} merges with the defaults). + podSecurityContext: + fsGroup: 65532 + fsGroupChangePolicy: OnRootMismatch persistence: enabled: true size: 10Gi diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index 0867d561839..c2b50b7e1de 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -85,13 +85,29 @@ services: - buzz-net # The Chainguard MinIO image runs as uid 65532; volumes written by the old - # root-run minio/minio image are root-owned. Hand them over once before start. + # root-run minio/minio image are root-owned. Hand them over before start. + # `up` reruns this while MinIO may be serving, so the walk is skipped once + # nothing is left to change, files that vanish mid-walk are tolerated, and + # only ownership still wrong afterwards fails the step. minio-perms: image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 user: "0:0" - entrypoint: ["chown", "-R", "65532:65532", "/data"] + entrypoint: + - /bin/sh + - -c + - | + stale() { find /data -xdev ! -user 65532 -print -quit 2>/dev/null; } + [ -z "$$(stale)" ] && exit 0 + chown -R 65532:65532 /data || true + left="$$(stale)" + [ -z "$$left" ] && exit 0 + echo "minio-perms: $$left is not owned by 65532" >&2 + exit 1 volumes: - buzz-minio-data:/data + network_mode: none + labels: + com.buzz.role: minio-ownership-migration restart: "no" minio: diff --git a/renovate.json b/renovate.json index 91bd5fcc837..ea30570040a 100644 --- a/renovate.json +++ b/renovate.json @@ -46,6 +46,14 @@ "matchManagers": ["cargo"], "allowedVersions": "<1.2.0" }, + { + "description": "MinIO runs from Chainguard's free latest-dev tags pinned by digest; superseded digests are not retained, so refresh them weekly. A digest bump can carry a new MinIO release with a one-way on-disk migration: never automerge. Digests carry no release timestamp, so the global timestamp-required release-age gate is lifted here.", + "matchPackageNames": ["cgr.dev/chainguard/**"], + "groupName": "chainguard minio images", + "schedule": ["before 6am on monday"], + "minimumReleaseAge": null, + "automerge": false + }, { "description": "tiptap 3.23.x breaks editor lifecycle under real relay latency — pin until upstream stabilizes.", "matchPackageNames": ["@tiptap/{/,}**"], From 1452243aac7f5c9a51a85fc03879f064d4892889 Mon Sep 17 00:00:00 2001 From: wiggdevin <202901685+wiggdevin@users.noreply.github.com> Date: Tue, 13 Oct 2026 15:21:09 -0700 Subject: [PATCH 4/5] fix(deploy): fail the MinIO ownership hand-over when /data cannot be 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> --- deploy/charts/buzz/templates/quickstart-minio.yaml | 14 +++++++++++--- deploy/compose/compose.yml | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/deploy/charts/buzz/templates/quickstart-minio.yaml b/deploy/charts/buzz/templates/quickstart-minio.yaml index 5ec4a2fa1a1..0878245f02b 100644 --- a/deploy/charts/buzz/templates/quickstart-minio.yaml +++ b/deploy/charts/buzz/templates/quickstart-minio.yaml @@ -45,10 +45,18 @@ spec: - /bin/sh - -c - | - stale() { find /data -xdev ! -user 65532 -print -quit 2>/dev/null; } - [ -z "$(stale)" ] && exit 0 + # Vanished entries ("No such file") are expected while MinIO serves; + # any other find error means /data could not be checked. + scan() { + out="$(find /data -xdev ! -user 65532 -print -quit 2>&1)" + bad="$(printf '%s\n' "$out" | grep '^find: ' | grep -v 'No such file or directory')" + [ -z "$bad" ] || { echo "data-ownership: cannot scan /data: $bad" >&2; exit 1; } + printf '%s\n' "$out" | grep '^/' | head -n 1 + } + first="$(scan)" || exit 1 + [ -z "$first" ] && exit 0 chown -R 65532:65532 /data || true - left="$(stale)" + left="$(scan)" || exit 1 [ -z "$left" ] && exit 0 echo "data-ownership: $left is not owned by 65532 (set minio.fixDataOwnership=false if the storage rejects root chown)" >&2 exit 1 diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index c2b50b7e1de..f9f2a26fcfd 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -96,10 +96,18 @@ services: - /bin/sh - -c - | - stale() { find /data -xdev ! -user 65532 -print -quit 2>/dev/null; } - [ -z "$$(stale)" ] && exit 0 + # Vanished entries ("No such file") are expected while MinIO serves; + # any other find error means /data could not be checked. + scan() { + out="$$(find /data -xdev ! -user 65532 -print -quit 2>&1)" + bad="$$(printf '%s\n' "$$out" | grep '^find: ' | grep -v 'No such file or directory')" + [ -z "$$bad" ] || { echo "minio-perms: cannot scan /data: $$bad" >&2; exit 1; } + printf '%s\n' "$$out" | grep '^/' | head -n 1 + } + first="$$(scan)" || exit 1 + [ -z "$$first" ] && exit 0 chown -R 65532:65532 /data || true - left="$$(stale)" + left="$$(scan)" || exit 1 [ -z "$$left" ] && exit 0 echo "minio-perms: $$left is not owned by 65532" >&2 exit 1 From 735557d48730b44060c7f2a516a05a30c6be8c99 Mon Sep 17 00:00:00 2001 From: wiggdevin <202901685+wiggdevin@users.noreply.github.com> Date: Tue, 27 Oct 2026 20:41:14 -0700 Subject: [PATCH 5/5] fix(deploy): harden the MinIO hand-over and document the one-time move 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> --- ARCHITECTURE.md | 2 +- .../buzz/templates/quickstart-minio.yaml | 2 +- .../buzz/tests/quickstart_bundled_test.yaml | 2 +- deploy/charts/buzz/values.yaml | 12 +++++++---- deploy/compose/README.md | 21 +++++++++++++++++++ deploy/compose/compose.yml | 9 ++++++-- renovate.json | 9 ++++++++ 7 files changed, 48 insertions(+), 9 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 5a393fc55ba..b6545a1a0e5 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -783,7 +783,7 @@ Docker Compose provides the full local development stack. All services include h | Postgres | `postgres:17-alpine` | 5432 | Primary event store — events, channels, tokens, workflows, audit; full-text search (`search_tsv` GIN) | | Redis | `redis:7-alpine` | 6379 | Pub/sub fan-out, presence (SET EX), typing (sorted sets) | | Adminer | `adminer` | 8082 | DB web UI (dev only) | -| MinIO | `cgr.dev/chainguard/minio:latest-dev` (digest-pinned; dev, CI, `deploy/compose`, chart quickstart) | 9000 (API), 9001 (console) | S3-compatible object storage (media) | +| MinIO | `cgr.dev/chainguard/minio:latest-dev` (digest-pinned in `deploy/compose` and the chart quickstart; dev and CI compose files track `latest-dev`) | 9000 (API), 9001 (console) | S3-compatible object storage (media) | | Prometheus | `prom/prometheus` | 9090 | Metrics collection | ### Postgres Schema (key tables) diff --git a/deploy/charts/buzz/templates/quickstart-minio.yaml b/deploy/charts/buzz/templates/quickstart-minio.yaml index 0878245f02b..4fcc0304b6b 100644 --- a/deploy/charts/buzz/templates/quickstart-minio.yaml +++ b/deploy/charts/buzz/templates/quickstart-minio.yaml @@ -55,7 +55,7 @@ spec: } first="$(scan)" || exit 1 [ -z "$first" ] && exit 0 - chown -R 65532:65532 /data || true + chown -Rh 65532:65532 /data || true left="$(scan)" || exit 1 [ -z "$left" ] && exit 0 echo "data-ownership: $left is not owned by 65532 (set minio.fixDataOwnership=false if the storage rejects root chown)" >&2 diff --git a/deploy/charts/buzz/tests/quickstart_bundled_test.yaml b/deploy/charts/buzz/tests/quickstart_bundled_test.yaml index 796bf9d1463..1a7ef2b2d43 100644 --- a/deploy/charts/buzz/tests/quickstart_bundled_test.yaml +++ b/deploy/charts/buzz/tests/quickstart_bundled_test.yaml @@ -115,7 +115,7 @@ tests: value: 0 - matchRegex: path: spec.template.spec.initContainers[0].command[2] - pattern: "chown -R 65532:65532 /data" + pattern: "chown -Rh 65532:65532 /data" - it: drops the root init container when minio.fixDataOwnership=false release: diff --git a/deploy/charts/buzz/values.yaml b/deploy/charts/buzz/values.yaml index ba5aa5feeba..89b029ae692 100644 --- a/deploy/charts/buzz/values.yaml +++ b/deploy/charts/buzz/values.yaml @@ -370,13 +370,17 @@ minio: # minio/minio and minio/mc left Docker Hub and Quay. Chainguard's free images # (latest tags only) are pinned by digest; -dev variants carry the /bin/sh the # init job needs. They run as uid 65532 (see quickstart-minio fsGroup). + # These digests were minio RELEASE.2026-09-22T19-25-18Z (the old pin was + # RELEASE.2025-09-07T16-13-09Z); check `minio --version` when bumping them. image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 mcImage: cgr.dev/chainguard/minio-client:latest-dev@sha256:2d11d09801b035510cb0c2ff0c64aa016fc94f0c4e7055a31ec17cf41dd154cb # Root initContainer that hands a root-owned volume (written by the old - # minio/minio image) to uid 65532 before MinIO starts; it skips the walk once - # ownership is right. Set false when the storage rejects root chown (NFS - # root_squash) or the namespace forbids root pods (PSA restricted, OpenShift - # restricted-v2); the volume must then already be writable by uid 65532. + # minio/minio image) to uid 65532 before MinIO starts; it skips the chown + # (not the ownership scan) once ownership is right. Set false when the storage + # rejects root chown (NFS root_squash) or the namespace forbids root init + # containers; the volume must then already be writable by uid 65532. This + # quickstart sets no container securityContext, so false alone does not make + # it pass PSA restricted or OpenShift restricted-v2. fixDataOwnership: true # Pod securityContext for MinIO. OpenShift restricted-v2 assigns its own # fsGroup range: set this to null there ({} merges with the defaults). diff --git a/deploy/compose/README.md b/deploy/compose/README.md index bb0e63fe15d..8661881d577 100644 --- a/deploy/compose/README.md +++ b/deploy/compose/README.md @@ -46,6 +46,27 @@ keypair. Run `./run.sh backup-hint` for the backup checklist. +### Moving off the Docker Hub MinIO image + +`minio/minio` and `minio/mc` are gone from Docker Hub. The stack now runs +Chainguard's MinIO (uid 65532, a newer MinIO release, so the on-disk format may +change one way). The `minio-perms` step hands an old root-owned `buzz-minio-data` +volume to uid 65532, but it must not run while the old root-run container is +still writing. Move over once, in this order: + +```bash +cd deploy/compose +docker compose stop relay minio # quiesce writers first +docker run --rm -v buzz-prod_buzz-minio-data:/data -v /var/backups:/backup alpine \ + tar czf /backup/minio-data-$(date +%F).tgz -C /data . # back up the volume +./run.sh pull +./run.sh start # runs minio-perms, then minio, then relay +``` + +Check the volume name with `docker volume ls | grep minio` (the project name is +`buzz-prod`). To roll the data back, restore the archive into the volume; the old +image is no longer pullable, so keep any local copy of it on the host. + ## Validation Before sharing an install link publicly, verify a fresh install with: diff --git a/deploy/compose/compose.yml b/deploy/compose/compose.yml index f9f2a26fcfd..a5da25c1090 100644 --- a/deploy/compose/compose.yml +++ b/deploy/compose/compose.yml @@ -89,6 +89,9 @@ services: # `up` reruns this while MinIO may be serving, so the walk is skipped once # nothing is left to change, files that vanish mid-walk are tolerated, and # only ownership still wrong afterwards fails the step. + # First move off the old root-run image: stop relay and minio BEFORE `up` + # (see README, "Moving off the Docker Hub MinIO image"), or the old container + # can write root-owned files after this step has finished. minio-perms: image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 user: "0:0" @@ -106,7 +109,7 @@ services: } first="$$(scan)" || exit 1 [ -z "$$first" ] && exit 0 - chown -R 65532:65532 /data || true + chown -Rh 65532:65532 /data || true left="$$(scan)" || exit 1 [ -z "$$left" ] && exit 0 echo "minio-perms: $$left is not owned by 65532" >&2 @@ -119,7 +122,9 @@ services: restart: "no" minio: - image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 # minio/minio left Docker Hub; -dev adds sh and wget + # minio/minio left Docker Hub; -dev adds sh and wget. This digest is minio + # RELEASE.2026-09-22T19-25-18Z (the old pin was RELEASE.2025-09-07T16-13-09Z). + image: cgr.dev/chainguard/minio:latest-dev@sha256:1f74aba71eff94011dbcb62947354f19d6e6efda5facd023fa3f4560d2a088d4 command: server /data --console-address ":9001" depends_on: minio-perms: diff --git a/renovate.json b/renovate.json index ea30570040a..563c9760b68 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,15 @@ "recreateWhen": "always", "separateMinorPatch": true, "postUpdateOptions": ["cargo:updateLockfile"], + "customManagers": [ + { + "description": "Renovate's helm-values manager only reads keys named image; minio.mcImage needs its own rule so its digest is refreshed with the minio image.", + "customType": "regex", + "managerFilePatterns": ["/^deploy/charts/buzz/values\\.yaml$/"], + "matchStrings": ["mcImage: (?[^:\\s]+):(?[^@\\s]+)@(?sha256:[a-f0-9]{64})"], + "datasourceTemplate": "docker" + } + ], "packageRules": [ { "description": "Major version bumps often require code changes — require human review.",