568 Commits

Author SHA1 Message Date
Manuel Alejandro de Brito Fontes
093e8c6586 [ws-manager] Improve tracing logs 2022-07-26 23:15:21 -03:00
Manuel Alejandro de Brito Fontes
3d691fa3a3 Fix tests 2022-07-26 21:51:21 -03:00
Manuel Alejandro de Brito Fontes
31ea75eb67 [ws-manager] Refactor connectToWorkspaceDaemon 2022-07-26 21:51:21 -03:00
JenTing Hsiao
a4767814b1 Retry ws-daemon if not found within 1 hour (every 5 seconds)
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-25 23:23:20 -03:00
JenTing Hsiao
b984b0c129 log warn if error happens and is not found error
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 20:26:17 -03:00
JenTing Hsiao
492f34b0d3 Better wording
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 20:26:17 -03:00
JenTing Hsiao
6f9d729f9c Do not try to mark workspace pod if the pod does not exists
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 20:26:17 -03:00
JenTing Hsiao
487575b0f3 Send event to workspace pod only when pod still exists
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 20:26:17 -03:00
JenTing Hsiao
422891828c Fix missing arguments
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 20:26:17 -03:00
Manuel Alejandro de Brito Fontes
ebef691ce2 [ws-manager] Only build snapshots of initialized/ready workspaces 2022-07-22 14:40:17 -03:00
Manuel Alejandro de Brito Fontes
d0e6bd7656 Refactor Manager StartWorkspace 2022-07-22 11:07:17 -03:00
JenTing Hsiao
8094e01762 Remove the duplicated error message
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-22 00:00: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
3ad16cac8f [ws-manager] fix not handling err in initializeWorkspaceContent 2022-07-20 22:17:15 -03:00
JenTing Hsiao
8bc561ca6a Use switch case for better code reading
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-18 20:35:13 +02:00
JenTing Hsiao
c5147d7633 Remove no longer used annotation gitpod.io/containerIsGone
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-18 20:35:13 +02: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
293d219cfb Use the eventRecorder from manager object
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
Pudong
ef139861d1 Revert "[ws-manager] do not overwrite failed state"
This reverts commit 96c136f2d266ebe23deca3236221de1e9ad06a36.
2022-07-18 06:21:13 +02:00
Pavel Tumik
96c136f2d2 [ws-manager] do not overwrite failed state 2022-07-15 21:36:02 +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
JenTing Hsiao
7619689e70 [ws-manager] fix unit test compiler error
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-14 20:03:01 +02:00
JenTing Hsiao
100632dd97 [ws-manager] Fix node in NotReady state, the workspace pod keeps in terminating state w/o backing up
When the node turns into a NotReady state, after a moment, the workspace pod
goes into the terminating state, but the containerStatus.state is still running.

We check the pod toleration matches against the node taint, with effect
NoExecute and the toleration seconds expired to make sure that the container's
graceful shutdown is finished before taking the content backup.
Otherwise, it might create an unstable backup.

https://github.com/gitpod-io/gitpod/issues/11336

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-07-14 20:03: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
03a141802e [ws-manager] Fix validStartReq tests 2022-07-08 14:27: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
04b9a64024 [ws-manager] Limit max secret length
to introduce a benign failure mode compared to the
Kubernetes provided message.
2022-07-06 19:22:53 +05:30
Christian Weichel
8248935e44 [ws-manager] Add Git token to workspace secret 2022-07-06 19:22:53 +05:30
Christian Weichel
3518346650 [ws-manager] Ship env vars as secret 2022-07-06 19:22:53 +05:30
ArthurSens
87a1e34f8e ws-manager: Replace backup/restore success with total metric
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2022-07-06 13:27:53 +05:30
JenTing Hsiao
856371178d Revert "Update k8s dependencies to v0.24.2"
This reverts commit 2911bc3283c2b79aacde0d16bce056de62eb696b.
2022-07-05 11:11:01 +02:00
JenTing Hsiao
b1fd9b6703 Revert "Update docker dependencies"
This reverts commit 02831a9e9e021b2d36942f29c2a64a3531c8e06d.
2022-07-05 11:11:01 +02:00
JenTing Hsiao
4c3ae4ba9a Revert "Remove deprecated test (because gsutil)"
This reverts commit 5cac340917b8bd35b2b31f89f8e452f23c0e1c5a.
2022-07-05 11:11:01 +02:00
Manuel Alejandro de Brito Fontes
5cac340917 Remove deprecated test (because gsutil) 2022-07-05 03:37:52 +05:30
Manuel Alejandro de Brito Fontes
02831a9e9e Update docker dependencies 2022-07-05 03:37:52 +05:30
Manuel Alejandro de Brito Fontes
2911bc3283 Update k8s dependencies to v0.24.2 2022-07-05 03:37:52 +05:30
Thomas Schubart
dd1992da46 [ws-manager] Implement cluster api 2022-06-30 21:26:38 +05:30
JenTing Hsiao
3da5e35c31 [ws-manager] enable the volume snapshot controller when the VolumeSnapshot CRD exists
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-28 16:53:37 +05:30
Pavel Tumik
7d005012a8 Add PVC support to prebuilds 2022-06-24 22:22:33 +05:30
JenTing Hsiao
3e7c2505d0 Add volume snapshot events to workspace pod event
Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-24 21:29:33 +05:30
JenTing Hsiao
8158f0b6c9 Watch VolumeSnapshot object is ready
When the VolumeSnapshot object is ready, notify to the Pod that it
belongs to.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-23 23:05:32 +05:30
JenTing Hsiao
75a40258fd Add volume_snapshot_controller
Add volume_snapshot_controller to watch the VolumeSnapshot object.

Signed-off-by: JenTing Hsiao <hsiaoairplane@gmail.com>
2022-06-23 23:05:32 +05:30
Pavel Tumik
26c17da071 call prestophook.sh from ring1 directly 2022-06-21 12:36:30 +05:30
Manuel Alejandro de Brito Fontes
6f0bbbf5a2 Update go modules 2022-06-20 20:43:31 +05:30
Pavel Tumik
5abab0393e [ws-manager] fix crash when restoring from volume snapshot 2022-06-17 06:37:26 +05:30