-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Respect client_idle_timeout config in kube proxy forwarder #49121
Conversation
@@ -92,7 +92,10 @@ func runPortForwardingWebSocket(req portForwardRequest) error { | |||
Channels: channels, | |||
}, | |||
}) | |||
conn.SetIdleTimeout(IdleTimeout) | |||
|
|||
if req.idleTimeout != 0 { |
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.
Do we need to protect against setting a timeout of 0?
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 don't really think you need it. I wonder if we should care about a max limit like K8S does of 4h
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.
@tigrato the max limit is controlled with streamingConnectionIdleTimeout
on the teleport's side we use client_idle_timeout
. Do you think we need something more?
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.
@creack what do you mean by streamingConnectionIdleTimeout ?
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.
The 4h limit in k8s is the default value of the streamingConnectionIdleTimeout kubelet setting
…low for long-running fort forard / exec sessions.
9c212cf
to
638d614
Compare
The idle timeout was hard-coded to 15 minutes, which prevented people from using long-running port-forward and exec sessions.
Now use the config value.
Changelog: Support for long-running kube exec/port-forward, respect client_idle_timeout config
Fixes #47813