123 Commits

Author SHA1 Message Date
Pavel Tumik
9a8151df25 refactor dispose workspace when using pvc 2022-11-03 01:16:07 +01:00
JenTing Hsiao
6fd748c4c6 ws-manager: remove PVC once the workspace pod is unschedulable
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-11-01 08:50:05 +01:00
Manuel Alejandro de Brito Fontes
edfd76d70d Log JSON as strings not an array of bytes 2022-10-26 23:36:41 +02:00
Thomas Schubart
09f463458d [ws-manager] Make protected secrets the default 2022-10-24 13:56:38 +02:00
utam0k
24f61c7028 ws-manager: Redact logs of a workspace status. 2022-10-21 03:47:36 +02:00
Pudong Zheng
a83040893e [ws-manager] refactory image layers 2022-10-13 20:08:30 +02:00
JenTing Hsiao
801de49c1f Skip "MountVolume.MountDevice failed for volume"
Ignore the FailedMount event with the message contains MountVolume.MountDevice failed for volume.

The ws-manager catches the FailedMount event and writes the error message into the workspace Conditions.Failed.
Then, the workspace pod is stopped, and the workspace failed message will be shown to the user.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-10-12 02:44:27 +02:00
Pavel Tumik @ GitPod
efde42770b [pvc] potential workaround for mount volume failure 2022-10-04 23:02:20 +02:00
Pavel Tumik @ GitPod
89f5072b5e [ws-manager] improve warning message in StartWorkspace fn 2022-09-28 20:15:29 +02:00
Christian Weichel
2e66269b2d [ws-manager] Remove req logs 2022-09-28 19:43:28 +02:00
JenTing Hsiao
169f8e7e76 ws-manager: return error if restore volume snapshot to smaller PVC size
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-28 09:42:28 +02:00
JenTing Hsiao
01fda6568c ws-mananger: refactor volume snapshot watcher
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-27 00:31:27 +02:00
JenTing Hsiao
df91671058 Add workspapce ID annotation to VolumeSnapshot object for filter event
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-09-16 00:58:16 +02:00
Pavel Tumik @ GitPod
d4fe26f45f [ws-manager] add policy key to tracing in StopWorkspace call 2022-09-13 01:18:14 +02:00
Pavel Tumik
07d80c8fa8 add support for aborting workspaces 2022-08-23 20:20:40 +02:00
Andrew Farries
c4363513a5 Run gofmt
gofmt -w .

From the repository root.
2022-08-08 10:54:52 -03:00
Pavel Tumik
ee9c9a3a4a improve tracing 2022-08-02 16:57:48 -03:00
JenTing Hsiao
35c6bd1a86 ws-manager: go through stopping phase even if the workspace is not ready
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-29 23:45:24 -03:00
JenTing Hsiao
bcc2956b61 Correct const variable naming. It should be a label, not an annotation
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-29 14:51:23 -03:00
Manuel Alejandro de Brito Fontes
f842bc51e2 Handle Pending pod due to Unschedulable reason 2022-07-28 12:17:23 -03:00
JenTing Hsiao
4c18f660ae Check the pod label to determine the PVC feature flag is set
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-27 11:57:22 -03:00
Manuel Alejandro de Brito Fontes
093e8c6586 [ws-manager] Improve tracing logs 2022-07-26 23:15:21 -03:00
Manuel Alejandro de Brito Fontes
31ea75eb67 [ws-manager] Refactor connectToWorkspaceDaemon 2022-07-26 21:51:21 -03:00
Manuel Alejandro de Brito Fontes
d0e6bd7656 Refactor Manager StartWorkspace 2022-07-22 11:07:17 -03:00
Pavel Tumik
eac0ff1595 [ws-manager] when connecting to ws-daemon, ensure pod is running 2022-07-20 22:34:15 -03:00
Pavel Tumik
1d5e26c8a1 Update components/ws-manager/pkg/manager/manager.go 2022-07-18 20:34:14 +02:00
Pavel Tumik
50e3a5a942 Update components/ws-manager/pkg/manager/manager.go 2022-07-18 20:34:14 +02:00
JenTing Hsiao
9ac885f6f2 Use correct log variable to include OWI information in each log entry
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-18 20:34:14 +02:00
JenTing Hsiao
50d0fd078d Add event to the workspace pod related to the restoration of the PVC
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-18 20:34:14 +02:00
Manuel Alejandro de Brito Fontes
05a0b75b22 [ws-manager] Wait for pod running before removing annotations 2022-07-15 04:45:01 +02:00
Manuel Alejandro de Brito Fontes
991ce8961b [ws-manager] Remove workaround for 1.23.0 >= k8s < 1.23.6 2022-07-15 01:44:01 +02:00
Kyle Brennan
d7bb7b9234 [ws-manager] log errors as warnings during exponential backoff
If we still have an error afterwards, then log it
2022-07-08 22:29:55 +05:30
Christian Weichel
7fda2b3445 [ws-manager] Only extract secrets when FF is set 2022-07-08 14:27:55 +05:30
Pavel Tumik
a3105091f9 [ws-manager] fix bad log entry 2022-07-08 00:41:54 +05:30
Christian Weichel
3518346650 [ws-manager] Ship env vars as secret 2022-07-06 19:22:53 +05:30
Thomas Schubart
dd1992da46 [ws-manager] Implement cluster api 2022-06-30 21:26:38 +05:30
Pavel Tumik
5abab0393e [ws-manager] fix crash when restoring from volume snapshot 2022-06-17 06:37:26 +05:30
Pudong Zheng
fe6e39e3a3 [workspace] support user upload ssh keys
Co-authored-by: Huiwen <huiwen@gitpod.io>
Co-authored-by: Christian Weichel <chris@gitpod.io>
Co-authored-by: Pavel Tumik <18602811+sagor999@users.noreply.github.com>
2022-06-15 22:58:25 +05:30
Thomas Schubart
45b0b45ec0 Make some workspace metadata properties optional 2022-06-15 21:43:25 +05:30
Thomas Schubart
f5d555948a Extend ws-manager tracing with team and project 2022-06-15 21:43:25 +05:30
JenTing Hsiao
9631a0b57b Remove deprecated function
The function grpc.WithInsecure() is deprecated, use
grpc.WithTransportCredentials(insecure.NewCredentials()) instead.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-15 13:07:24 +05:30
Pavel Tumik
7a7792f531 volume snapshot delete and restore support, garbage collection 2022-06-15 02:37:25 +05:30
Pavel Tumik
e1b335c029 [ws-manager] change workspace state tracing 2022-06-14 17:06:24 +05:30
JenTing Hsiao
39557c3499 [ws-manager] Only calculate the volume restore time if it's restoring from the VolumeSnapshot
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-14 11:00:23 +05:30
JenTing Hsiao
b60a6d7079 [ws-manager] fix the possibility the volume restore time is incorrect
We might fall into the exponential backoff function, meaning that the
volume restore time would be calculated again even if we had already
calculated the volume restore time.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-14 11:00:23 +05:30
JenTing Hsiao
a171e147ab [ws-manager] Add a metric of PVC restore duration time
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-13 18:50:22 +05:30
JenTing Hsiao
ba4b27a386 [ws-manager] Skip error if the PVC resource already exists
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-13 18:50:22 +05:30
Christian Weichel
0f406c4468 [ws-manager] Add workspace class to metrics 2022-05-31 21:26:50 +05:30
Pavel Tumik
905be0afd1 address PR feedback 2022-05-25 13:17:39 +05:30
Pavel Tumik
99204170c5 ensure volume snapshot naming consistency 2022-05-25 13:17:39 +05:30