-
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
Add capability to use custom AWS STS Endpoint #4736
Conversation
Signed-off-by: Tomáš Novák <tom.nov96@gmail.com>
Signed-off-by: Tomáš Novák <tom.nov96@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.
Amazing, great job. To the point and clean PR, thanks for contributing 👍🏽
|
||
If you want to use IAM credential retrieved from an instance profile, Thanos needs to authenticate through AWS STS. For this purposes you can specify your own STS Endpoint. | ||
|
||
By default Thanos will use endpoint: https://sts.amazonaws.com and AWS region coresponding endpoints. |
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.
👍🏽
@@ -228,6 +229,7 @@ func NewBucketWithConfig(logger log.Logger, config Config, component string) (*B | |||
Client: &http.Client{ | |||
Transport: http.DefaultTransport, | |||
}, | |||
Endpoint: config.STSEndpoint, |
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.
That was... easy! 🙈
Looks like we might have unformatted code? Feel free to run |
And ping us on #thanos-dev, sad that first contributor CI pipelines has to enabled manually ): |
Signed-off-by: Tomáš Novák <tom.nov96@gmail.com>
Yeah, there was problem with formatting. I forgotten run thanos/pkg/compact/downsample/downsample.go Line 236 in 48a068c
But I do not interfered to this code. |
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Tomáš Novák <tom.nov96@gmail.com>
Commited suggestion. Now should CI pass and PR will be ready to final review and merge. |
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.
Looking good!
Changes
Added capability to use custom AWS STS Endpoint. It is helpfull when you cannot communicate out of AWS network to default endpoint https://sts.amazonaws.com/
If parameter
sts_endpoint
will not be set, minio used default https://sts.amazonaws.com/ or another regional mutation of this endpoint. Look hereVerification
I cannot run test along our testing buckets, then I test only
make test-local
andmake test-e2e-local
. I will be happy when someone else try it on real bucket.Review
This is my first public PR ever, then can I ask you (as maintainer of AWS/S3 client) to review this PR @bwplotka?