Skip to content
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 timeout option for kubernets #3211

Conversation

adrianlzt
Copy link
Contributor

Patch provided by jchauncey

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Patch provided by jchauncey
@adrianlzt
Copy link
Contributor Author

This code is provided by @jchauncey in #3203

if k.ResponseTimeout.Duration < time.Second {
k.ResponseTimeout.Duration = time.Second * 5
}
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This err check should go away, there is nothing to check here.

k.RoundTripper = &http.Transport{
TLSHandshakeTimeout: 5 * time.Second,
TLSClientConfig: tlsCfg,
ResponseHeaderTimeout: time.Duration(3 * time.Second),
ResponseHeaderTimeout: k.ResponseTimeout.Duration,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thinking aloud, we should switch to a http.client sometime so we can include the time to get the body. We are no worse off now with this change so not required.

@danielnelson danielnelson modified the milestone: 1.5.0 Sep 8, 2017
@danielnelson
Copy link
Contributor

@adrianlzt I can fix the above issues if that's easier.

@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Sep 8, 2017
@adrianlzt
Copy link
Contributor Author

sure @danielnelson

@danielnelson danielnelson changed the base branch from master to kubernetes_timeout September 13, 2017 00:21
@danielnelson danielnelson merged commit 2163981 into influxdata:kubernetes_timeout Sep 13, 2017
maxunt pushed a commit that referenced this pull request Jun 26, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants