Skip to content

Gitpod port control via gp-cli #9286

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

Closed
konne opened this issue Apr 13, 2022 · 6 comments
Closed

Gitpod port control via gp-cli #9286

konne opened this issue Apr 13, 2022 · 6 comments

Comments

@konne
Copy link

konne commented Apr 13, 2022

for me the current gp foreward-port is missleading it should be changed because it control the public mode

Please introduce a clear API for the port management via the gp cli with the following functions:

in the following text [local] means always a port that is accessibly from the local computer via local-companion / vscode / ...

  1. make a port public accessibly or not: for example
    gp port 8080 --public or gp port 8080 --private
  2. check if local-companion is available
    gp port status -> returns all ports with the current status and if local-companion is available
  3. make a port local available or unavailable and define the port mapping
    gp port -R 80:127.0.0.1:3000
    gp port -L 80:127.0.0.1:3000. ... use SSH logic because this is well known
  4. delete a port forwarding
    gp port -KR 80
    gp port -KL 80 ... again use SSH logic for deleting remote and local port forwards

This would allow having full control of the workspace.

@shaal
Copy link
Contributor

shaal commented Apr 18, 2022

Yes please!
Being able to change ports programmatically, after workspace already running would be a great feature!

@loujaybee loujaybee removed this from 🚀 IDE Team May 9, 2022
@loujaybee
Copy link
Member

Removing from project as associated to epic: #9262

@loujaybee
Copy link
Member

loujaybee commented Jun 1, 2022

Some updates here...

gp port status -> returns all ports with the current status and if local-companion is available

Please see: #10388 (documentation pending)

However I'm not sure what you mean by "if local-companion" is available, in this context?

make a port public accessibly or not: for example

This is also described in: #9930 (not yet implemented)

@konne
Copy link
Author

konne commented Jun 1, 2022

@loujaybee can you please also add a possibility to fetch the port status as JSON result. The printed cli table is nice in the terminal, but hard to use in bash,... scripts (see #10388 implementation) for example with the --json argument

@loujaybee
Copy link
Member

loujaybee commented Jun 3, 2022

Thanks for the feedback @konne, I've added as a separate issue, as if we make that change, would be good to do it unilaterally across all commands to keep them consistent 🙏 - #10448

@stale
Copy link

stale bot commented Sep 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Sep 9, 2022
@stale stale bot closed this as completed Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants