-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bitnami/minio] Update minio-env.sh to allow custom path for persist #55562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the contribution @Mo0rBy! The PR looks good on my side, though I added a minor comment as review. Please check it whenever you can!
@@ -78,6 +78,7 @@ export MINIO_DISTRIBUTED_MODE_ENABLED="${MINIO_DISTRIBUTED_MODE_ENABLED:-no}" | |||
export MINIO_DEFAULT_BUCKETS="${MINIO_DEFAULT_BUCKETS:-}" | |||
export MINIO_STARTUP_TIMEOUT="${MINIO_STARTUP_TIMEOUT:-10}" | |||
export MINIO_SERVER_URL="${MINIO_SERVER_URL:-$MINIO_SCHEME://localhost:$MINIO_API_PORT_NUMBER}" | |||
export MINIO_DATA_DIR="${MINIO_DATA_DIR:-/bitnami/minio/data}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick; could you move it back to the path section? It's true it could also be considered part of MinIO config but having all the path-related envs grouped seems more intuitive to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! I was 50/50 on where this should go in here as everything in the "path" section is non-configurable, but this is still a path, but now it is a configurable path!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FraPazGal Bumping this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, the PR LGTM @Mo0rBy! Let me run a couple of check in our internal pipeline before merging this.
…nce directory and updated README.md Signed-off-by: Will Moorby <will.moorby2@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…nce directory and updated README.md
Description of the change
This change allows the
MINIO_DATA_DIR
environment variable to be a configurable value so that the persistence directory can exist at a path inside the container that is not/bitnami/minio/data
.Benefits
This allows users to have a persistence directory that is not the default
bitnami/minio/data
path so that mounting the persistence volume to something like AWS EFS or EBS can be done with naming conventions suited to the user/team.Possible drawbacks
This is very small change, I honestly can't think of any apart from something to check while troubleshooting/debugging.
Applicable issues
My own issue created in
bitnami/charts
> bitnami/charts#21757 (I will be looking at creating a Helm chart PR in the next few days as well, when I get time).Additional information
I tested this by running the container image locally, going into the UI and creating a new bucket called
test-bucket
and you can see that when I shell into the container, there is atest-bucket
directory created at the custom persistence path.Here is a screenshot of my terminal to prove that the bucket exists in the correct place (inside
custom-data-dir
):I would not consider this a limitation but this configuration requires that the user deploying the container must have the container path mount and the environment variables as the same value. This is ONLY when configuring the container to use a custom persistence path, the default
/bitnami/minio/data
can still be used. I have updated the relevant section of theREADME.md
which explains.