8000 feat: use websockets for port forwards by AustinAbro321 · Pull Request #3717 · zarf-dev/zarf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: use websockets for port forwards #3717

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

Merged
merged 2 commits into from
Apr 22, 2025

Conversation

AustinAbro321
Copy link
Contributor
@AustinAbro321 AustinAbro321 commented Apr 22, 2025

Description

This updates the tunnel package to use the Kubernetes portforward websocket feature. This should resolve long standing issues in the community that makes Zarf incompatible with tools like aws ssm as the current port forward method does not work well with proxies or gateways.

Related Issue

Fixes #3715

Checklist before merging

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
@AustinAbro321 AustinAbro321 requested review from a team as code owners April 22, 2025 14:19
Copy link
netlify bot commented Apr 22, 2025

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 5e416c4
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/6807c156c29cac0008153f10

Copy link
codecov bot commented Apr 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/cluster/tunnel.go 0.00% 16 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/cluster/tunnel.go 10.22% <0.00%> (-0.30%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

return nil, err
}
dialer := spdy.NewDialer(upgrader, &http.Client{Transport: transport}, method, url)
if !cmdutil.PortForwardWebsockets.IsDisabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop this if, since you always want to have that full fallback mechanism enabled. At least for quite a few future releases until k8s decides entirely to drop that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wasn't sure if there was some niche use case where a user would still want to force the old port forwarder, assuming not I'll go ahead and remove this

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
8000
Copy link
Member
@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - good find

Copy link
Contributor
@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Apr 22, 2025
Merged via the queue into main with commit d8fd11d Apr 22, 2025
26 checks passed
@AustinAbro321 AustinAbro321 deleted the use-websockets-for-port-forward branch April 22, 2025 17:11
nevinaragam pushed a commit to nevinaragam/zarf that referenced this pull request May 20, 2025
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: NevinAragam <nevin.aragam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zarf should move to websockets for port-forward behavior
3 participants
0