-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Per call objstore Upload/Get options #3781
Comments
Just to continue our discussions from Slack.
I love this direction. Ideally, it would be awesome if the implementation (fact that it is S3 or not) does not leak from Wonder only what's the difference between |
We discussed this in the 2021-02-11 contributor office hour and decided to start simple, with an exposed context key defined in |
Is your proposal related to a problem?
Cortex uses on Thanos objstore clients. Cortex needs to build per-tenant S3 encryption key support and would like to avoid to create a new S3 client for each tenant: having a single S3 client allows to reuse S3 connections.
Describe the solution you'd like
The Thanos S3 client allows to config the
SSEConfig
at client creation time. In order to reuse the same client for different tenants, we would need to be able to pass a customSSEConfig
to each singleGet()
andUpload()
call.A solution would be introducing the ability to pass options to
Get()
andUpload()
. To not introduce breaking changes in theobjstore.Bucket
signature we could leverage on thecontext.Context
.An idea could be having a
WithOptions(objstore.Bucket) objstore.Bucket
generic function to wrap aobjstore.Bucket
with options which are then injected in the context by the options wrapper. The underlying client implementation (eg.s3.go
) would be changed to be able to read such options and configure the Get/Upload operation accordingly.If a bucket doesn't support options (eg. SSE encryption is only supported by S3) such options would be ignored.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: