fix: replace deprecated mc config host add with mc alias set - #288
fix: replace deprecated mc config host add with mc alias set#288KajdeMunter wants to merge 1 commit into
mc config host add with mc alias set#288Conversation
The MinIO bucket job used `mc config host add`, which current minio/mc images no longer recognize: mc: <ERROR> `config` is not a recognized command. Because the job ends in `exit 0`, it still reports Complete while the alias was never registered, so `mc mb` writes a local directory inside the container instead of creating the bucket on MinIO. The uploads bucket silently never exists. Switch both charts to `mc alias set`, which takes the same ALIAS URL ACCESSKEY SECRETKEY argument order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughBoth Helm charts replace the deprecated MinIO host configuration command with ChangesMinIO alias configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized chart change replaces a deprecated MinIO command in both affected templates, with no actionable merge-blocking risk remaining after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
The MinIO bucket-provisioning job uses
mc config host add, which currentminio/mcimages no longer recognize. Replaced withmc alias setin bothplane-ceandplane-enterprise.mc alias settakes the sameALIAS URL ACCESSKEY SECRETKEYargument order, so only the subcommand changes. The followingmc mbandmc anonymous setcalls are still current and are untouched.Why
The job fails with:
This fails silently, which is the important part. The command chain ends in
exit 0, so:mc config host adderrors — theplane-app-minioalias is never registered.mc mb plane-app-minio/uploadsthen treatsplane-app-minio/uploadsas a local filesystem path and creates a directory inside the container. It printsBucket created successfully— indistinguishable from real success.mc anonymous set downloadlikewise reports success against that local path.exit 0→ Kubernetes marks the Job Complete.So the install looks healthy while the
uploadsbucket does not exist on MinIO. The failure only surfaces later as broken file uploads/attachments. Verified on a clean MinIO server: after the old command,mc lsreturns an empty bucket list.Scope / behavior
plane-ceandplane-enterprisecarry identical command blocks; both are fixed here.{{- if .Values.minio.local_setup }}(CE) /{{- if .Values.services.minio.local_setup }}(EE). Installs using external S3 are unaffected.mcdroppedconfig) are unaffected —mc mbon an existing bucket is a no-op the job already tolerates.Testing
Verified against
minio/mc:latestand a liveminio/minio:latestserver in Docker.1. Confirmed the deprecation is real:
2. Confirmed the silent-failure impact — ran the old command against a clean server, then listed buckets:
3. Ran the exact rendered command from
helm template(host swapped for the test container) against a live server:The bucket and its anonymous policy now exist on the server.
4.
helm lint charts/plane-ce charts/plane-enterprise→ 2 linted, 0 failed.grep -rn "mc config" charts/→ no matches remaining.Not deployed to a live Kubernetes cluster; the container-level test above exercises the exact rendered command the Job runs.
Related
plane-ce(touches the same template; independent branch, no conflict)🤖 Generated with Claude Code
Summary by CodeRabbit