Skip to content

Respect client_idle_timeout config in kube proxy forwarder#49121

Merged
creack merged 1 commit intomasterfrom
creack/fix-kube-fw-idle-timeout
Nov 25, 2024
Merged

Respect client_idle_timeout config in kube proxy forwarder#49121
creack merged 1 commit intomasterfrom
creack/fix-kube-fw-idle-timeout

Conversation

@creack
Copy link
Copy Markdown
Contributor

@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

Comment thread lib/kube/proxy/portforward_websocket.go Outdated
})
conn.SetIdleTimeout(IdleTimeout)

if req.idleTimeout != 0 {
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor 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
@creack creack deleted the creack/fix-kube-fw-idle-timeout branch November 25, 2024 17:33
@public-teleport-github-review-bot
Copy link
Copy Markdown

@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