-
Notifications
You must be signed in to change notification settings - Fork 832
feat: expose S3 HTTP configs for TSDB S3 client #3244
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: expose S3 HTTP configs for TSDB S3 client #3244
Conversation
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
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.
I think I would suggest using DefaultConfig
from github.com/thanos-io/thanos/pkg/objstore/s3
package for configuring default values. Otherwise LGTM.
pkg/storage/backend/s3/config.go
Outdated
|
||
// RegisterFlagsWithPrefix registers the flags for TSDB s3 storage with the provided prefix | ||
func (cfg *HTTPConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { | ||
f.DurationVar(&cfg.IdleConnTimeout, prefix+"s3.http.idle-conn-timeout", 0, "If set, the time an idle connection will remain idle before closing.") |
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.
Should we use default values from vendor/github.com/thanos-io/thanos/pkg/objstore/s3/s3.go:49 (90s idle conns timeout, and 2min response header timeout) instead?
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.
Yes, I think that makes sense.
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.
I think that will be a change from what Cortex does now, so let's document that in the CHANGELOG as well.
Signed-off-by: Jacob Lisi <[email protected]>
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 with a couple of nits. Thanks!
Signed-off-by: Jacob Lisi <[email protected]>
InsecureSkipVerify bool `yaml:"insecure_skip_verify"` | ||
|
||
// Allow upstream callers to inject a round tripper | ||
Transport http.RoundTripper `yaml:"-"` |
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.
This isn't used, is it?
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.
This is used by downstream projects.
What this PR does:
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]