Skip to content

[v17] kube: fix websocket fallback logic#55722

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

[v17] kube: fix websocket fallback logic#55722
tigrato merged 1 commit intobranch/v17from
bot/backport-55696-branch/v17

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Jun 13, 2025

Backport #55696 to branch/v17

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:23
@tigrato tigrato added this pull request to the merge queue Jun 14, 2025
@tigrato tigrato removed this pull request from the merge queue due to a manual request Jun 14, 2025
@tigrato tigrato added this pull request to the merge queue Jun 14, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 14, 2025
@tigrato tigrato added this pull request to the merge queue Jun 14, 2025
Merged via the queue into branch/v17 with commit bd128e9 Jun 14, 2025
40 checks passed
@tigrato tigrato deleted the bot/backport-55696-branch/v17 branch June 14, 2025 22:06
@fheinecke fheinecke mentioned this pull request Jul 1, 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