66 Commits

Author SHA1 Message Date
Anton Kosyakov
9b3f8a2cc4 gp rebuild with isolated debug workspace
Co-authored-by: Pudong Zheng <tianshi8650@gmail.com>
2023-02-06 14:47:44 +01:00
Huiwen
e147452a00 [supervisor] improve instance updates 2023-01-17 01:19:24 +01:00
mustard
f4ea3a56a1 Revert "Revert "[supervisor] use public api in supervisor""
This reverts commit 44dfc5e19be3b89d96ab25f2f83476d57aa7b8ef.
2022-12-12 09:05:22 -03:00
Huiwen
44dfc5e19b Revert "[supervisor] use public api in supervisor"
This reverts commit f3fcfbf003425f947bf3a0a28e452709623b6d74.
2022-12-09 08:21:19 -03:00
mustard
f3fcfbf003 [supervisor] use public api in supervisor
Co-authored-by: mustard <mhqnwt@gmail.com>
Co-authored-by: Anton Kosyakov <anton@gitpod.io>
Co-authored-by: Jean Pierre <jeanp413@hotmail.com>
Co-authored-by: iQQBot <tianshi8650@gmail.com>
2022-12-08 17:48:18 -03:00
Christian Weichel
478a75e744 Switch license to AGPL 2022-12-08 13:05:19 -03:00
mustard
975608c0fe [supervisor] add test cases for exposed not served ports 2022-11-18 12:17:48 +02:00
mustard
f68c049786 [supervisor] remove ports for workspace config 2022-11-18 12:17:48 +02:00
mustard
dc3e193358 [supervisor] add test cases and fix workspace configed ports alway on top 2022-11-18 12:17:48 +02:00
mustard
9df6cf8ba2 [supervisor] fix order change in config only not works 2022-11-18 12:17:48 +02:00
mustard
f597a96f05 [supervisor] localify struct of ports sort 2022-11-18 12:17:48 +02:00
Manuel Alejandro de Brito Fontes
439877a81b [supervisor] Only poll supported protocols 2022-11-09 17:59:39 +02:00
mustard
fbb8a8114a [supervisor] add test cases for ports order 2022-10-20 22:01:36 +02:00
mustard
71889fd187 [supervisor] respond PortsStatus with order 2022-10-20 22:01:36 +02:00
mustard
cb77bdffc2 [supervisor] local exposed 2022-10-11 17:38:27 +02:00
Anton Kosyakov
2a7b920da7 random exponential backoff of port exposure 2022-10-05 11:16:20 +02:00
Jean Pierre
0acc0b30ec [supervisor] Add PortsStatus::on_open and deprecate ExposedPortInfo::on_exposed 2022-09-22 12:29:23 +02:00
Pavel Tumik
3005ea04b7 fix unhelpful log messages 2022-07-13 04:06:59 +02:00
Manuel Alejandro de Brito Fontes
6ee9b23ed4 [supervisor] Remove common warnings 2022-06-29 09:21:37 +05:30
mustard
308601ad59 Fix port name and desc missed for ranges ports 2022-05-25 18:05:39 +05:30
mustard
53c9935d37 Add comment for port ranges 2022-05-24 13:25:38 +05:30
mustard
37a1d8ea27 Fix supervisor send empty port name and desc 2022-05-24 12:59:38 +05:30
utam0k
0d57f4abe3 supervisor: Remove slirp4netns 2022-04-29 22:45:15 +05:30
Anton Kosyakov
5bdf47767e Revert "ws-daemon: Use a pair of veths instead of slirp4netns"
This reverts commit 4fef102695684ad3e98ed90c7f368d79aa1e304d.
2022-04-08 18:19:21 +05:30
utam0k
4fef102695 ws-daemon: Use a pair of veths instead of slirp4netns
Pod Network Namespace(ring1)
+------------------------------------------------+
|                                                |
|       Workspace Network Namesapce(ring2)       |
| +--------------------------------------------+ |
| |                                            | |
| |              default via veth0             | |
| |                                            | |
| |                                            | |
| |     +------+  +--------------+             | |
| |     |  lo  |  |    ceth0     | 10.0.2.2/24 | |
| |     +------+  +--^--------+--+             | |
| |                  |        |                | |
| +------------------+--------+----------------+ |
|                    |        |                  |
|                 +--+--------v--+               |
|   +-----------> |    veth0     | 10.0.2.1/24   |
|   |             +-----------+--+               |
|   |                         |                  |
|   |          +--------------v-----+            |
|   |          |                    |            |
|   |          |      nftables      |            |
|   |          |   (ip masquerade)  |            |
|   |          +--------------+-----+            |
|   |                         |                  |
|   |   +------+  +-----------v--+               |
|   |   |  lo  |  |     eth0     |               |
|   |   +------+  +--^--------+--+               |
|   |                |        |                  |
|   |          +-----+--------v-----+            |
|   |          |                    |            |
|   +----------+      nftables      |            |
| if with port | (port redirecter)  |            |
|              +-----^--------+-----+            |
|                    |        |                  |
+--------------------+--------+------------------+
                     |        |
                     |        |
                     |        v
                    o u t s i d e
2022-04-08 13:41:21 +05:30
Jean Pierre
ddd3ced7bf Only ignore served ports bound to the workspace IP address if we have corresponding reverse proxy 2022-01-17 04:39:09 +01:00
Jean Pierre
301f6c4f3e Don't try to connect to opened ports
Otherwise it causes an exception to be thrown constantly in the vscode-js-debug extension while debugging causing the extension host to crash after some time
2022-01-16 17:43:09 +01:00
Anton Kosyakov
de440410fb Revert "[supervisor] Add log for exposed port instance update"
This reverts commit 73e93f3f5497978f98d2628e7651b70e9915992a.
2022-01-15 17:17:08 +01:00
Victor Nogueira
f85494006d [supervisor] Provide port Name and Description along with the port status 2021-12-20 18:42:44 +01:00
Cornelius A. Ludmann
73e93f3f54 [supervisor] Add log for exposed port instance update 2021-12-07 09:20:32 +01:00
Manuel Alejandro de Brito Fontes
fe5bc40d12 Fix readNetTCPFile 2021-11-05 10:33:03 +01:00
Manuel Alejandro de Brito Fontes
bb1349fd94 Refactor supervisor port exposure 2021-11-05 10:33:03 +01:00
Manuel Alejandro de Brito Fontes
5934558596 Provide a stable port order 2021-11-03 14:58:11 +01:00
Manuel Alejandro de Brito Fontes
d70eb53070 [supervisor] Lint code 2021-11-03 14:58:11 +01:00
Christian Weichel
8f6e4bc79b [supervisor] Add slirp4netns support 2021-10-26 20:42:04 +02:00
Anton Kosyakov
9f5270c694 fix #5929: use sync.Cond to notify about gitpod config changes
There was some kind of deadlock while one listener was trying to read a config changes.
I rewrote gitpod config service to use conditional variable to announce changes in gitpod config to avoid synchronization over map of listeners.
I changed clients as well that they don't consider nil config as closed channel and stop reading.
2021-10-14 09:57:01 -03:00
Manuel Alejandro de Brito Fontes
cbd0718a8c [supervisor] Remove unnecessary log about port already exposed 2021-09-03 07:26:09 +02:00
Manuel Alejandro de Brito Fontes
347ad95d80 Switch from fmt.Errorf to xerrors.Errorf 2021-08-30 02:47:28 -03:00
Anton Kosyakov
57b7b7cfb6 [supervisor] allow retry auto exposing port 2021-06-23 11:43:24 +05:00
Cornelius A. Ludmann
caa322c871 Make port visibility private by default 2021-06-21 16:22:15 +02:00
Manuel Alejandro de Brito Fontes
bd3ba7cdec Refactor port parsing 2021-06-16 10:45:31 -04:00
Anton Kosyakov
f7b2e37cbd [supervisor] support tunneled ports 2021-05-20 09:49:33 +02:00
Manuel Alejandro de Brito Fontes
d3ebfd454b Update golangci-lint 2021-05-11 07:15:24 -04:00
Manuel Alejandro de Brito Fontes
3b4ebc9bad Migrate deprecated methods from ioutil package 2021-03-02 06:37:49 -03:00
Manuel Alejandro de Brito Fontes
2b6a56bc40 Update go imports 2021-03-02 06:37:49 -03:00
Anton Kosyakov
2cab99e5e7 [supervisor] handle rate limitting of exposed ports 2021-02-08 14:46:28 +01:00
Christian Weichel
6b10ec9eb0 [supervisor] Don't blindly deref port configs
fixes #3007

/werft no-preview
2021-01-28 14:06:01 +01:00
Christian Weichel
9336b090be [supervisor] Make reaper terminating during shutdown
Fixes gitpod-io/gitpod#2654
2021-01-15 14:11:21 +01:00
Christian Weichel
7935b7f015 [gitpod-protocol] Move Go server API client to gitpod-protocol
This way it's accessible from packages other than supervisor,
e.g. future integration tests.
2021-01-08 13:40:43 +01:00
Christian Weichel
b7dda84ad0 [license] Update license header from TypeFox GmbH to Gitpod GmbH 2021-01-04 15:12:02 +01:00