Skip to content

Conversation

jtlisi
Copy link
Contributor

@jtlisi jtlisi commented Sep 27, 2020

What this PR does:

  • Expose additional HTTP configuration parameters for the Minio S3 client vendored from Thanos
    Checklist
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Jacob Lisi <[email protected]>
Copy link
Contributor

@pstibrany pstibrany left a 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.


// 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.")
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@pracucci pracucci left a 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]>
@jtlisi jtlisi merged commit 1d201f4 into cortexproject:master Sep 28, 2020
@jtlisi jtlisi deleted the 20200927_expose_s3_httpconfigs branch September 28, 2020 19:04
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`

// Allow upstream callers to inject a round tripper
Transport http.RoundTripper `yaml:"-"`
Copy link
Contributor

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?

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants