-
Notifications
You must be signed in to change notification settings - Fork 635
Make exec timeout configurable #803
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
Conversation
@cpuguy83 PTAL |
Thanks! One thing I'd like is if this can be changed so we aren't breaking callers of these functions. |
I have updated the PR, thanks |
node/api/server.go
Outdated
@@ -39,7 +39,7 @@ type PodHandlerConfig struct { | |||
} | |||
|
|||
// PodHandler creates an http handler for interacting with pods/containers. | |||
func PodHandler(p PodHandlerConfig, debug bool) http.Handler { | |||
func PodHandler(p PodHandlerConfig, debug bool, cfg ...StreamTimeOutConfig) http.Handler { |
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.
Sorry I was thinking something like functional options so ...func(*Config)
And then you can provide a list of functions to set the config... e.g. WithStreamIdleTimeout(dur)
.
But looking at the underlying code again, I think we could probably just add a stream config to the PodHandlerConfig
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.
Updated, thanks
29eac4c
to
493f029
Compare
493f029
to
ed63b5e
Compare
Co-Authored-By: Brian Goff <cpuguy83@gmail.com>
Updated |
a701c8c
to
9eb591e
Compare
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
Thank you!
Make exec timeout configurable
See
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/config/types.go#L165
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kubelet.go#L2296
kubelet also allows to change default steamIdleTimeout, so I think it's to reasonable to make it configurable
Fix: #791