Skip to content

fix: replace deprecated mc config host add with mc alias set - #288

Open
KajdeMunter wants to merge 1 commit into
makeplane:masterfrom
KajdeMunter:fix/mc-alias-set-deprecated-config
Open

fix: replace deprecated mc config host add with mc alias set#288
KajdeMunter wants to merge 1 commit into
makeplane:masterfrom
KajdeMunter:fix/mc-alias-set-deprecated-config

Conversation

@KajdeMunter

@KajdeMunter KajdeMunter commented Aug 14, 2026

Copy link
Copy Markdown

What

The MinIO bucket-provisioning job uses mc config host add, which current minio/mc images no longer recognize. Replaced with mc alias set in both plane-ce and plane-enterprise.

# charts/{plane-ce,plane-enterprise}/templates/workloads/minio.stateful.yaml
-              /usr/bin/mc config host add plane-app-minio
+              /usr/bin/mc alias set plane-app-minio
               http://{{ .Release.Name }}-minio...:9000 "$AWS_ACCESS_KEY_ID" "$AWS_SECRET_ACCESS_KEY";

mc alias set takes the same ALIAS URL ACCESSKEY SECRETKEY argument order, so only the subcommand changes. The following mc mb and mc anonymous set calls are still current and are untouched.

Why

The job fails with:

mc: <ERROR> `config` is not a recognized command. Get help using `--help` flag.

This fails silently, which is the important part. The command chain ends in exit 0, so:

  1. mc config host add errors — the plane-app-minio alias is never registered.
  2. mc mb plane-app-minio/uploads then treats plane-app-minio/uploads as a local filesystem path and creates a directory inside the container. It prints Bucket created successfully — indistinguishable from real success.
  3. mc anonymous set download likewise reports success against that local path.
  4. exit 0 → Kubernetes marks the Job Complete.

So the install looks healthy while the uploads bucket 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 ls returns an empty bucket list.

Scope / behavior

  • Both charts affected. plane-ce and plane-enterprise carry identical command blocks; both are fixed here.
  • Only renders when MinIO is chart-managed — the template is wrapped in {{- if .Values.minio.local_setup }} (CE) / {{- if .Values.services.minio.local_setup }} (EE). Installs using external S3 are unaffected.
  • One-line subcommand swap per chart. No values, no defaults, no other templates, no chart versions changed.
  • Existing installs whose bucket was created manually (or before mc dropped config) are unaffected — mc mb on an existing bucket is a no-op the job already tolerates.

Testing

Verified against minio/mc:latest and a live minio/minio:latest server in Docker.

1. Confirmed the deprecation is real:

$ mc config host add ...
mc: <ERROR> `config` is not a recognized command.
$ mc alias set --help
USAGE: mc alias set ALIAS URL ACCESSKEY SECRETKEY

2. Confirmed the silent-failure impact — ran the old command against a clean server, then listed buckets:

Bucket created successfully `plane-app-minio/oldbucket`.   <- misleading
Access permission ... is set to `download`                 <- misleading
$ mc ls <server>
(empty — no bucket was created)

3. Ran the exact rendered command from helm template (host swapped for the test container) against a live server:

Added `plane-app-minio` successfully.
Bucket created successfully `plane-app-minio/uploads`.
Access permission for `plane-app-minio/uploads` is set to `download`

$ mc ls <server>
[2026-08-14 11:04:03 UTC]     0B uploads/
$ mc anonymous get <server>/uploads
Access permission for `<server>/uploads` is `download`

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

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated MinIO setup during deployment to use the current alias configuration command.
    • Improved compatibility with newer MinIO client versions.

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>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 891f0eca-8ebe-4d12-be5c-c59b39c97711

📥 Commits

Reviewing files that changed from the base of the PR and between 1b568bb and 3155906.

📒 Files selected for processing (2)
  • charts/plane-ce/templates/workloads/minio.stateful.yaml
  • charts/plane-enterprise/templates/workloads/minio.stateful.yaml

Walkthrough

Both Helm charts replace the deprecated MinIO host configuration command with mc alias set in their bucket initialization Jobs.

Changes

MinIO alias configuration

Layer / File(s) Summary
Update MinIO alias configuration
charts/plane-ce/templates/workloads/minio.stateful.yaml, charts/plane-enterprise/templates/workloads/minio.stateful.yaml
The bucket initialization commands use mc alias set. Endpoint and credential arguments remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 31559

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: akshat5302

Poem

A rabbit checks the MinIO line,
“Alias set” now works just fine.
Old commands hop away,
New ones guide the way,
Two charts now keep the buckets in line.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the replacement of the deprecated MinIO command, which is the main change in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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