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

Respect client_idle_timeout config in kube proxy forwarder #49121

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

creack
Copy link
Member

@creack creack commented Nov 17, 2024

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

@@ -92,7 +92,10 @@ func runPortForwardingWebSocket(req portForwardRequest) error {
Channels: channels,
},
})
conn.SetIdleTimeout(IdleTimeout)

if req.idleTimeout != 0 {
Copy link
Contributor

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?

Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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 ?

Copy link
Member Author

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.
@creack creack force-pushed the creack/fix-kube-fw-idle-timeout branch from 9c212cf to 638d614 Compare November 20, 2024 19:45
@creack creack added this pull request to the merge queue Nov 25, 2024
Merged via the queue into master with commit 16d4b05 Nov 25, 2024
41 checks passed
@creack creack deleted the creack/fix-kube-fw-idle-timeout branch November 25, 2024 17:33
@public-teleport-github-review-bot

@creack See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Create PR

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

Successfully merging this pull request may close these issues.

Kubectl exec idle timeout after 15 minutes
3 participants