这是indexloc提供的服务,不要输入任何密码
Skip to content

add portforwarding support to node/api #1102

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 6 commits into from
Jun 16, 2023

Conversation

aka-somix
Copy link
Contributor

Summary

This PR adds support for PortForwarding implementation in virtual kubelet.

Added

  • Portforward package brought from kubernetes repository (/internal/kubernetes/portforward)
  • Helpers to support PortForward http requests from API Server

Issues involved

This should close #170 , LIQO provider has already an implementation in place for this feature, you can look at it here

@aka-somix aka-somix marked this pull request as ready for review April 6, 2023 18:23
@pires pires self-assigned this Apr 7, 2023
Copy link
Member

@pires pires left a comment

Choose a reason for hiding this comment

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

Overall LGTM but:

  • It would be great to have some form of end-to-end testing proving the feature;
  • I would add a notice that SPDY is deprecated and the community has been looking - for a long while - for supporting HTTP/2 kubernetes/kubernetes#7452 (comment)

@helayoty helayoty added this to the v1.9 milestone Apr 7, 2023
- Copy the portforward package from kubernetes repository
- Add helpers to support PortForward http requests from API Server

Co-authored-by: aka-somix <somix.land@null.net>
Co-authored-by: Pablo Borrelli <pablo.borrelli0@gmail.com>
@ssoBAekiL ssoBAekiL force-pushed the feature/node-portforward branch from e81c737 to 7e4e1a9 Compare April 11, 2023 13:28
@aka-somix
Copy link
Contributor Author

Overall LGTM but:

* It would be great to have some form of end-to-end testing proving the feature;

* I would add a notice that SPDY is deprecated and the community has been looking - for a long while - for supporting HTTP/2 [SPDY is deprecated. Switch to HTTP/2. kubernetes/kubernetes#7452 (comment)](https://github.com/kubernetes/kubernetes/issues/7452#issuecomment-1490565720)

For the first point we will try working on that, but since there is no reference of e2e test regarding the Exec helper (or at least I couldn't find any) it could take a while to figure out how to add one.

For the latter, would be ok with you if we just add a TODO comment where SPDY is used that says to replace it asap since SPDY is deprecated ?

@helayoty helayoty requested a review from cpuguy83 April 11, 2023 18:51
@pires
Copy link
Member

pires commented Apr 14, 2023

@aka-somix, on the first bullet, please, take a look and report back for our own knowledge. Maybe even add a comment in the code detailing your findings. On the second bullet, yes, the TODO/notice is enough for me.

@helayoty helayoty modified the milestones: v1.9, v1.10 Apr 19, 2023
@windyear
Copy link
Contributor

@aka-somix
When I was using this PR about portforward, I found that the function definition of portforward had not been added to the provider's interface definition. This resulted in the portforward feature not being implemented when using virtual-kubelet as a node.

So, based on my actual usage scenario, I made some modifications, and it is work in my environment. I make a pr to your repo. Please review my PR if it is correct or wrong.

@helayoty
Copy link
Member

@windyear, thanks for pointing this out. Could you please open a PR in this repo so we can review/approve it?

windyear added a commit to windyear/virtual-kubelet that referenced this pull request Apr 27, 2023
When I was using this virtual-kubelet#1102 about portforward, I found that the function definition of portforward had not been added to the provider's interface definition. This resulted in the portforward feature not being implemented when using virtual-kubelet as a node.
   please reivew this fix with the pr virtual-kubelet#1102
@ssoBAekiL
Copy link
Contributor

ssoBAekiL commented Apr 29, 2023

@pires , @helayoty in order to implement the e2e test for port forwarding we also require the piece of code developed by @windyear so to be able to proceed we see two possible paths:

  • First ours and his PR are merged and we implement e2e in a new PR
  • We merge windyear's commit into our branch and then all of the changes are brought through our PR

What do you think could be the best option?

@pires
Copy link
Member

pires commented Apr 30, 2023

The latter.

windyear and others added 2 commits May 16, 2023 08:50
optimize: add PortForward to the Provider interface and add the PortForward from the provider to the PodHandlerConfig.
@helayoty helayoty enabled auto-merge (squash) June 16, 2023 01:40
@helayoty helayoty disabled auto-merge June 16, 2023 01:41
@helayoty helayoty merged commit 59fd7fd into virtual-kubelet:master Jun 16, 2023
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.

Feature: Implement Port forwarding
5 participants