58 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
26f7f5d742
Add more initializer-related info to /insights API (#20572)
* [ws-manager, ws-daemon] Store initializer metrics in workspace.Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [ws-mananger-api, -mk2] Emit new field .Status.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [db] Introduce DBWorkspaceInstanceMetrics and persist all metrics from ws-manager-api into it

Tool: gitpod/catfood.gitpod.cloud

* [api] Expose session.Metrics.InitializerMetrics

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Export metrics into CSV

Tool: gitpod/catfood.gitpod.cloud

* [content-service] Fix: emit fromBackup stats

Tool: gitpod/catfood.gitpod.cloud

* Update components/ws-manager-api/core.proto

Co-authored-by: Filip Troníček <filip@gitpod.io>

---------

Co-authored-by: Filip Troníček <filip@gitpod.io>
2025-02-26 14:34:12 -05:00
Filip Troníček
5bb738a530
Add WS image metrics to workspace instances (#20426)
* Add WS image metrics to workspace instances

* Update tests

* fix ws-manager-api field description

* Prefer existing DB values for metrics

* Copy proto comments over to protocol type
2024-12-09 05:01:16 -05:00
suchsoon
a307738d04
remove repetitive words (#19527)
Signed-off-by: suchsoon <silverjadebeauty@gmail.com>
2024-03-25 12:07:34 +01:00
Wouter Verlaek
a77139c176
[ws-manager-mk2] Add workspace reconciler tracing (#19537)
* [ws-manager-mk2] Add workspace reconciler tracing

* More tracing
2024-03-18 19:02:27 +01:00
Pudong
f87f76620f
[ws-manager-mk2] do not report workspace activity metrics if it not a leader (#19360) 2024-01-29 10:49:05 +02:00
Pudong
6ecc991ff5
[experimental] add ssh certificate authorities as feature flags (#19208) 2023-12-07 22:59:14 +02:00
Pudong
10fe5b9699
[sshgateway] use ssh CA to auth (#19147)
* [sshgateway] use ssh CA to auth

* change name

* add error log

* fix

* mark volume optional

* [installer] validate ssh-ca secret

* Revert "[installer] validate ssh-ca secret"

This reverts commit ca6ede78a7b5a720fd315eca32eb277cb5063069.

We must support the scenario where the installer has the secret, but, it is not in the cluster yet.

---------

Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2023-11-30 19:17:08 +02:00
Thomas Schubart
a96456ae29
Manage only workspaces created by manager (#19155)
* Add managed by label

* Fix test

* Handle workspaces if no label is set
2023-11-30 15:50:07 +02:00
Pudong
b983b6276f
[ws-manager] use workspace class description (#19164) 2023-11-29 14:11:06 +02:00
Christian Weichel
bb51f07988
Collect workspace classes from workspace cluster (#19003)
* Extend ws-manager API to support workspace class descriptions

fixes ENG-1065

* Extend  DescribeCluster in ws-manager-mk2

to acurately report the available workspace classes

fixes ENG-1066

* Add workspace classes to cluster in DB

* Intergrate workspace cluster collection in ws-manager-bridge

* Feature flag off discovered workspace class usage

* Fix build

* Add unittest for getSupportedWorkspaceClasses

* Fix workspace class storage

* Adress review feedback
2023-11-10 13:13:48 +02:00
Manuel Alejandro de Brito Fontes
687f337899
Enable leader election in ws-manager-mk2 (v3) (#18539)
* Enable leader election in ws-manager-mk2

* Update go modules

* Move workspace activity to CRD

* Remove workspace activity

* Cleanup

* Update ws-manager-mk2 CRD

* Cleanup

* Restore lastActivity logic

* TEST

* Disable observability

* Start the grpc server after leader election

* Bount the source of subscribers to an informer

* Cleanup

* Avoid deepCopy

* Remove goroutine to execute OnReconcile

* Refactor last activity to be consistent acrtoss the controllers

* Address feedback
2023-08-26 22:28:52 +02:00
Manuel Alejandro de Brito Fontes
7e3ccd1197
Revert "Enable leader election in ws-manager-mk2 (#18511)" (#18537)
This reverts commit 2838b782309bb22b9341b2cf7ead718fc34bcba8.
2023-08-17 13:02:43 +02:00
Manuel Alejandro de Brito Fontes
2838b78230
Enable leader election in ws-manager-mk2 (#18511)
* Enable leader election in wa-manager-mk2

* Switch to four parallel tests

* Cleanup

* Update activity started time after leader election

* Count maintenance test failures

* Wait before updating the activity started time
2023-08-17 11:13:43 +02:00
Thomas Schubart
ce6d3795ec
[wsman-mk2] Check if workspace exists (#17999) 2023-07-04 22:23:21 +08:00
Thomas Schubart
20164cbb4a
[wsman-mk2] Simplify condition checking (#17961) 2023-06-17 22:59:07 +08:00
Thomas Schubart
c729eb8dd9
[ws-manager-mk2] Make workspace class limiting the default (#17917)
* [wsman-api] Remove class limiting feature flag

* [wsman-mk2] Remove class limiting feature flag
2023-06-15 17:15:05 +08:00
Thomas Schubart
e4688a23a7
[ws-manager-mk2] Configure max workspace lifetime (#17767)
* [wsman-api] Add maximum lifetime to workspace request

* [wsman-api] Add maximum lifetime to workspace CRD

* [wsman] Set maximum lifetime during workspace start

* [wsman] Check custom max lifetime

* [wsman-api] Fix conflicting raw proto

* [wsman-mk2] Test custom max lifetime
2023-06-12 19:25:02 +08:00
Huiwen
306ac3bf98
Add missing protocol property IDE-153 (#17890)
* Add missing protocol property

* 💄
2023-06-09 23:44:00 +08:00
Wouter Verlaek
8861acb8a3
[ws-manager-mk2] Remove maintenance CM from installer (#17693) 2023-05-23 17:05:57 +08:00
Kyle Brennan
1a7c50a8b5
[ws-manager-mk2] support storage quotas (#17606)
* [ws-manager-mk2] add support for storage quotas

This way, on workspace create, `ws-daemon` can set XFS limits for `/workspace`

* [preview] set smaller /workspace limits

This way we don't have to spend more on preview environments.

* [ws-daemon] warn when xfs is missing

* Partial revert of "Revert "[ws-daemon] Restart IWS if ws-daemon is restarted (#17552)" (#17645)"

This reverts commit e082b7f48885199013df927d3c71c62935f74047.

It avoids reverts on notify.go and workspace_provider.go.

* [ws-daemon] log when handling running workspaces

* [test] add test for xfs quotas
2023-05-19 20:49:53 +08:00
Pudong
176393a0c8
Add support to forward https protocol port (#17644)
* add support to forward https protocol port

* Update components/ws-proxy/pkg/proxy/routes.go

Co-authored-by: Kyle Brennan <kyle@gitpod.io>

---------

Co-authored-by: Kyle Brennan <kyle@gitpod.io>
2023-05-19 15:22:53 +08:00
Wouter Verlaek
85324b6951
[ws-manager-mk2] Refactor lastActivity (#17548) 2023-05-11 15:29:56 +08:00
Wouter Verlaek
054c07248c
[ws-manager-mk2] Custom retry backoff params for modifyWorkspace (#17533) 2023-05-09 20:28:54 +08:00
Wouter Verlaek
6a8b9a9971
[ws-manager-mk2] Return exposed ports in workspace status (#17462) 2023-05-02 18:04:40 +08:00
Wouter Verlaek
c1e627a66f
[ws-manager-mk2] Improve reconcile err logging (#17419)
* [ws-manager-mk2] Improve reconcile err logging

* Update StopWorkspace err log

* Fix errors
2023-04-28 14:56:36 +08:00
Thomas Schubart
ff1b82d02a
[wsman-mk2] Publish workspace activity metric (#17344) 2023-04-25 19:53:46 +08:00
Wouter Verlaek
2d4f94634c
[ws-manager-mk2] Fix git status (#17097)
* [ws-manager-mk2] Fix git status

* Remove unused var
2023-04-03 11:03:43 +02:00
Pudong
24c401ab78
[ws-manager-mk2] support custom closed timeout (#16988)
* [ws-manager-mk2] support custom closed timeout

* Default to the RegularWorkspace timeout

* remove code

---------

Co-authored-by: Wouter Verlaek <wouter@gitpod.io>
2023-03-31 20:05:40 +02:00
Wouter Verlaek
9e95640ab4
[ws-manager-mk2] Implement DescribeCluster (#17064) 2023-03-29 11:49:39 +02:00
Wouter Verlaek
ea5c7a6aab
[e2e] Support and fixes for mk2 e2e tests (#16990)
* [e2e] Support and fixes for mk2 e2e tests

* Fix GHA mk2 flag, add experimental label

* Add if

* Fix slack msg

* Empty-Commit again

---------

Co-authored-by: Kyle Brennan <kylos101@gmail.com>
2023-03-24 23:42:23 +01:00
Thomas Schubart
ace513ad7e
[ws-manager-mk2] Refactor workspace status conditions (#16896)
* [wsman-mk2] Refactor conditions

* [wsman-mk2] Specify reason
2023-03-20 11:10:12 +01:00
Thomas Schubart
c800175c72
[ws-manager-mk2] Protect tokens (#16806)
* [wsman-mk2] Create token secret

* [installer] Fix casing for namespace type metadata

* [installer] Create secrets namespace

* [installer] Configure roles and bindings

* [installer] Move namespace constant to common pkg

* [installer] Create permissions for ws-daemon

* [wsman-mk2] Watch on multiple ns

* [ws-daemon] Use token secret

* [wsman-mk2] Remove secret from initializer

* [wsman-mk2] Test token secret

* [werft] Fix document index

* [installer] Update render tests

* [wsman-mk2] Fix imports

* [wsman-mk2] Ensure maintenance controller required permissions

* [wsman-mk2] Retry deleting secret

* [installer] Ensure objects in secrets namespace are only created with mk2 option
2023-03-15 12:57:07 +01:00
Thomas Schubart
2c259c4dc8
[ws-manager-mk2] Support public SSH keys (#16413) 2023-03-13 14:50:49 +01:00
Wouter Verlaek
25220bb30b
[ws-manager-mk2] Maintenance mode (#16702)
* [ws-manager-mk2] Maintenance mode reconciler

* [ws-manager-mk2] Check for maintenance mode

* [ws-manager-mk2] Default to maintenance mode on startup

* [ws-manager-mk2] Disable maintenance on unmarshal failure
2023-03-09 17:25:45 +01:00
Thomas Schubart
040ab4de13
[ws-manager-mk2] Fix prebuild update events (#16688)
* [wsman-mk2] Change snapshot name for prebuilds

* [ws-manager-mk2] Return false instead of empty bool

* [ws-daemon] Update snapshot url while in stopping phase
2023-03-07 14:34:04 +01:00
Wouter Verlaek
ee9ea036d7
[ws-manager-mk2] Fix stopped status (#16665) 2023-03-06 16:28:04 +01:00
Wouter Verlaek
1631a4a038
[ws-manager-mk2] Loadgen fixes, concurrent reconciliation (#16613)
* [ws-manager-mk2] Loadgen fixes, concurrent reconciliation

* [ws-manager-mk2] Update tests with content readiness

* Simplify content ready check

* Fix json tags

* Revert poll interval
2023-03-06 15:18:04 +01:00
Thomas Schubart
400be836fb
[ws-manager-mk2] Protect environment secrets (#16601)
* [installer] Configure RBAC access to secrets

* [wsman-mk2] Create environment workspace secret

* [wsman-mk2] Delete workspace secret after start/stop

* [ws-manager-mk2] Update tests

* [ws-manager-mk2] Remove poll
2023-03-06 12:42:03 +01:00
Thomas Schubart
0f190439c2
[ws-manager-mk2] Setup separate image builder deployment for mk2 (#16519)
* [installer] Setup seperate image builder deployment for mk2

* [image-builder] Route to wsman-mk2

* [wsman-mk2] Set default class

* [installer] Update render tests

* [ws-manager-mk2] Use image builder secret

* [image-builder] Update render tests
2023-03-02 12:31:59 +01:00
Wouter Verlaek
df3e15a1d4
[ws-manager-mk2] Remove headless from status (#16530) 2023-02-23 17:36:53 +01:00
Thomas Schubart
116a5b97b2
[ws-manager-mk2] Support workspace snapshots (#16471)
* [ws-manager-mk2] Scaffold snapshot CRD

* [ws-mangaer-mk2] Generate snapshot type

* [ws-manger-mk2] Provide snapshot endpoint

* [ws-daemon] Handle snapshots

* [ws-manager-mk2] Harmonize imports

* [ws-manger-mk2] Set owner reference

* [installer] Install snapshot CRD

* [ws-manager-api] Fix descriptions

* [ws-manager-mk2] Review comments

- Name controller
- Return early in case of error
- Reduce scope of permissions
2023-02-23 16:45:53 +01:00
Wouter Verlaek
00229da4af [ws-manager-mk2] Add finalizer on workspace, handle deletion 2023-02-15 11:27:19 +01:00
Thomas Schubart
ad3b05c064 [ws-manager-mk2] Support system environment variables 2023-02-15 08:22:19 +01:00
Thomas Schubart
de8ee028a2 [ws-manager-mk2] Support class|network limiting and PSI 2023-02-15 08:05:19 +01:00
Wouter Verlaek
e62c773362 [ws-manager-mk2] Aborted condition, grace period 2023-02-14 12:04:19 +01:00
Wouter Verlaek
468f7bf016 [ws-manager-mk2] Controller env tests 2023-02-13 22:08:18 +01:00
Wouter Verlaek
810e17508d [ws-manager-mk2] Extract ctrl utils to common-go 2023-02-07 11:19:45 +01:00
Wouter Verlaek
971c3d6412 [ws-manager-mk2] Implement MarkActive 2023-02-07 10:51:45 +01:00
Thomas Schubart
c2f8799433 [ws-manager-mk2] Remove todos with no action required 2023-02-01 17:52:40 +01:00
Thomas Schubart
63f168ab38 [ws-manager-mk2] Add metrics 2023-01-30 23:22:38 +01:00