-
Notifications
You must be signed in to change notification settings - Fork 1.3k
SSH Gateway #7412
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
SSH Gateway #7412
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7412 +/- ##
===========================================
+ Coverage 19.04% 32.59% +13.54%
===========================================
Files 2 61 +59
Lines 168 9112 +8944
===========================================
+ Hits 32 2970 +2938
- Misses 134 5925 +5791
- Partials 2 217 +215
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
e8bb61c
to
0b55333
Compare
Please don't forget to fill in |
case "tcpip-forward": | ||
newChannel.Reject(ssh.UnknownChannelType, "Gitpod SSH Gateway cannot remote forward ports") | ||
default: | ||
newChannel.Reject(ssh.UnknownChannelType, fmt.Sprintf("Gitpod SSH Gateway cannot handle %s channel types", newChannel.ChannelType())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may be worth to log that we know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may spam the logs. Consider introducing a counter metric instead
updated |
I tested for regressions:
It turned out to be a regression in the local companion: #7420 |
9e7c4bf
to
42a2a2c
Compare
@csweichel I can confirm that VS Code and JetBrains integration work nicely with this approach. Could you review please? 🙏 We would like to move with that as soon as possible to provide JetBrains team with test builds of Gateway plugin. |
will take a look before the end of the day |
Already rebase, you can test again after build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code by and large looks very good. A bunch of nits and potentially dangling Go routines.
Trying this now.
case "tcpip-forward": | ||
newChannel.Reject(ssh.UnknownChannelType, "Gitpod SSH Gateway cannot remote forward ports") | ||
default: | ||
newChannel.Reject(ssh.UnknownChannelType, fmt.Sprintf("Gitpod SSH Gateway cannot handle %s channel types", newChannel.ChannelType())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may spam the logs. Consider introducing a counter metric instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR is about more than just preview envs and there is time pressure - feel free to merge and do the cleanup in a follow-up PR.
LGTM label has been added. Git tree hash: 689ab2beec09246c6286895ba7d44ee1b5303b7e
|
.werft/build.ts
Outdated
@@ -533,6 +535,21 @@ export async function deployToDevWithInstaller(deploymentConfig: DeploymentConfi | |||
werft.fail('authProviders', err); | |||
} | |||
|
|||
werft.log("SSH gateway hostkey", "copy host-key from secret") | |||
try { | |||
exec(`kubectl --namespace keys get secret host-key -o yaml \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run kubectl --namespace keys get secret host-key
before
Line 334 in c732acb
exec(`mv k3s.yml /home/gitpod/.kube/config`) |
This is needed in the with-vm scenario because we change the kubectl-context awawy from core-dev to the preview environment's k3s cluster.
if [[ "ws-proxy" == "$NAME" ]] && [[ "$KIND" == "Service" ]]; then | ||
WORK="overrides for $NAME $KIND" | ||
echo "$WORK" | ||
# Provide harvester compatibility by adding ports instead of modifying the original ports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Just one remark; Other than that it L very GTM :) |
/lgtm |
LGTM label has been added. Git tree hash: 2bcb02036bd6c74d5153b22c147ce61ab7d6a580
|
/lgtm |
LGTM label has been added. Git tree hash: 8f36f5acf9454ef47aa4ee772afcd7b44c997b9c
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akosyakov, csweichel, meysholdt, MrSimonEmms Associated issue: #5602 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
Description
Add SSH Gateway to ws-proxy
This Gateway support sftp, shell, pty, scp and port-forward
Related Issue(s)
Fixes #5602
How to test
Common step
Integration with openssh
workspaceId
password isownerToken
2. or you can use
workspaceId:ownerToken
for the username, and provider any publickeyIntegration with VSCode Desktop
remote.SSH.configFile
Connect to Host...
workspaceId@workspaceUrl
orworkspaceId:ownerToken@workspaceUrl
Integration with Jetbrains IDE
Connect via SSH
workspace url
and user isworkspaceId
orworkspaceId:ownerToken
How to get ownerToken?
kubectl
orlens
Release Notes
Documentation
TOOD: