-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add timeout option for kubernets #3211
Conversation
Patch provided by jchauncey
This code is provided by @jchauncey in #3203 |
if k.ResponseTimeout.Duration < time.Second { | ||
k.ResponseTimeout.Duration = time.Second * 5 | ||
} | ||
if err != nil { |
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 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, |
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.
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.
@adrianlzt I can fix the above issues if that's easier. |
sure @danielnelson |
Patch provided by jchauncey
Required for all PRs: