Skip to content

[v18] kube: fix websocket fallback logic#55723

Merged
tigrato merged 1 commit intobranch/v18from
bot/backport-55696-branch/v18
Jun 14, 2025
Merged

[v18] kube: fix websocket fallback logic#55723
tigrato merged 1 commit intobranch/v18from
bot/backport-55696-branch/v18

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jun 13, 2025

Backport #55696 to branch/v18

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 added this pull request to the merge queue Jun 14, 2025
Merged via the queue into branch/v18 with commit cdb4a64 Jun 14, 2025
42 checks passed
@tigrato tigrato deleted the bot/backport-55696-branch/v18 branch June 14, 2025 21:34
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