Skip to content

[v16] kube: fix websocket fallback logic#55733

Merged
tigrato merged 2 commits intobranch/v16from
bot/backport-55696-branch/v16
Jun 14, 2025
Merged

[v16] kube: fix websocket fallback logic#55733
tigrato merged 2 commits intobranch/v16from
bot/backport-55696-branch/v16

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jun 13, 2025

Backport #55696 to branch/v16

changelog: Fixed a bug that could cause Kubernetes exec requests to fail when the Kubernetes cluster had the WebSocket-based exec protocol disabled.

Kubernetes 1.29 introduced support for the new exec over Websocket protocol.
In Kubernetes 1.29, this was an alpha feature which wasn't enabled by
default, but in Kubernetes 1.30 this feature flag was promoted to beta
stage and enabled by default. As such, we implemented the logic to
always prefer the Kubernetes exec over websocket if the Kubernetes
cluster supported it. The check that verified if we should prefer the
websocket was a simple Kubernetes version check and the condition was
`version >= 1.30.0`.

For OpenShift this check is not valid as they ship Kubernetes 1.30+ with
that feature disabled. Likely disabled at loadbalancer level. Given that
the version check wasn't reliable for all Kubernetes supported clusters,
this commit changes the logic to always use a fallback executor.

This executor initially tries to establish the websocket connection and
if it fails, it will fallback to the second executor. In our case, the
preferred executor is websocket and the secondary executor is SPDY.

Fixes #55695

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from zmb3 June 13, 2025 18:22
@tigrato tigrato enabled auto-merge June 14, 2025 21:15
@tigrato tigrato added this pull request to the merge queue Jun 14, 2025
Merged via the queue into branch/v16 with commit 00c1b05 Jun 14, 2025
38 checks passed
@tigrato tigrato deleted the bot/backport-55696-branch/v16 branch June 14, 2025 21:52
@fheinecke fheinecke mentioned this pull request Jul 2, 2025
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.

3 participants