-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(buckets): add CRYOSTAT_BUCKETS for pre-created buckets #4
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andrewazores
force-pushed
the
precreate-buckets
branch
from
January 17, 2024 15:01
4b3411d
to
80d55e4
Compare
This reverts commit 090253e.
…efaults it assumes
andrewazores
force-pushed
the
precreate-buckets
branch
from
January 22, 2024 20:34
467c9c2
to
2e51f50
Compare
ebaron
approved these changes
Jan 22, 2024
andrewazores
added a commit
to andrewazores/cryostat-storage
that referenced
this pull request
Aug 16, 2024
7 tasks
andrewazores
added a commit
to andrewazores/cryostat-storage
that referenced
this pull request
Aug 20, 2024
andrewazores
added a commit
that referenced
this pull request
Sep 6, 2024
mergify bot
pushed a commit
that referenced
this pull request
Sep 9, 2024
See #4 Related to cryostatio/cryostat-helm#115 (cherry picked from commit ff64237)
7 tasks
andrewazores
added a commit
that referenced
this pull request
Sep 9, 2024
…23) (#24) fix(startup): improve startup detection for bucket creation (#23) See #4 Related to cryostatio/cryostat-helm#115 (cherry picked from commit ff64237) Co-authored-by: Andrew Azores <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to Cryostat3! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes: #3
Based on #1
Depends on #1
Description of the change:
Adds an environment variable
CRYOSTAT_BUCKETS
that defines a comma-separated list of bucket names that should be automatically created in the storage volume.Motivation for the change:
See #1. It is useful to be able to declare the required buckets on the storage container itself, so that applications (like cryostat) that expect particular buckets to exist can simply assume that they do/will, rather than needing to implement behaviour to check and create them all the time on their own.
An alternate approach is to figure out what initialization work actually needs to be done (ie what is
weed shell
doing under the covers), and see if it is possible to do that work before executing the original entrypoint script and bootstrapping the system. This is probably more fragile to any underlying implementation changes by Seaweed, however.How to manually test:
./build.bash
podman run --rm -it -e CRYOSTAT_ACCESS_KEY=a -e CRYOSTAT_SECRET_KEY=b -e CRYOSTAT_BUCKETS=archivedrecordings -e WEED_V=4 -p 8333:8333 -p 8888:8888 cryostat-storage:latest
aws
CLI and run:AWS_ACCESS_KEY_ID=a AWS_SECRET_ACCESS_KEY=b aws s3 ls --endpoint-url http://localhost:8333
2024-01-16 18:01:26 archivedrecordings
, indicating the creation time of the one bucket specified in theCRYOSTAT_BUCKETS
env var. Repeat this test with differentCRYOSTAT_BUCKETS
values, separated by commas, with lengths from 3 to 63 characters.