182 Commits

Author SHA1 Message Date
Wouter Verlaek
2ac49194c6
Revert "Filter subscriber reconciler events (#18660)" (#18694)
This reverts commit 9470fb880093522021c1eaeecfb0373d087c39c3.
2023-09-11 11:28:09 +02:00
Manuel Alejandro de Brito Fontes
9470fb8800
Filter subscriber reconciler events (#18660)
* Filter subscriber reconciler events

* Notify changes in the port visibility

* Switch to reflect.DeepEquals

* Address feedback
2023-09-06 16:33:04 +02:00
Gero Posmyk-Leinemann
938f0ba841
[ws-manager-api] Remove deprecated fields (#18641) 2023-09-01 14:38:58 +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
Wouter Verlaek
bf3d548266
[ws-manager-mk2] Scrub status fields, add vscode launch.json (#18595)
* [ws-manager-mk2] Scrub status fields, add vscode launch.json

* Fix scrubber panic on unexported pointer
2023-08-25 13:00:51 +02:00
Manuel Alejandro de Brito Fontes
513ca768f6
Update buildkit to v0.12.1 (#18505)
* Update buildkit to v0.12.1

* Update DisplaySolveStatus signature

* Switch to github.com/containerd/typeurl/v2
2023-08-15 09:17:40 +02:00
Kyle Brennan
34b4602286
[ws-manager-mk2] remove experimental mode feature (#18513)
* [installer] remove experimental mode

* [ws-manager-mk2] remove experimental node selector

* [ws-manager-api] remove ExperimentalMode from configuration

* Add `ws-manager-api` to vscode workspace

* [preview] remove experimental & bump deps

Depends on https://github.com/gitpod-io/gitpod-packer-gcp-image/pull/246

* [preview] LocalStorageCapacityIsolation is GA, no needed as a gate in 1.27
2023-08-15 06:37:41 +02:00
Manuel Alejandro de Brito Fontes
de4bbbea1c
Add a new trust bundle for custom SSL certificates (#18450)
* Add a new trust bundle for custom SSL certificates

* Mount the customer certificate in the workspace

* Use the custom certificate in components

* Cleanup

* Set env variables and mount the crt in a different file

* rename custom ca cert file name

* Fix the filename in env vars

* Enable custom SSL certificate conditionally

---------

Co-authored-by: nandajavarma <nandaja.varma@gmail.com>
2023-08-08 16:46:34 +02:00
Manuel Alejandro de Brito Fontes
61f89f8436
Update go modules (#18372) 2023-07-28 16:20:30 +08:00
Manuel Alejandro de Brito Fontes
8c6d8e28f3
Update dependencies (#18362)
* Update k8s dependencies to v1.27.3

* Update opencontainers/runtime-spec to v1.1.0

* Update controller runtime to v0.15.0

* Update go modules

* Fix build

* Cleanup

* Fix ws-manager e2e tests
2023-07-27 23:34:29 +08:00
Manuel Alejandro de Brito Fontes
54c2040632
Update go modules to 1.20 (#18360) 2023-07-27 22:24:29 +08:00
Manuel Alejandro de Brito Fontes
57c605ddc4
Cleanup scrubber go module dependency (#18149) 2023-07-04 16:37:21 +08:00
Anton Kosyakov
f580e6bd00
fix SID-285: hook scrubber as logrus formatter (#17781) 2023-06-29 17:16:47 +08:00
Wouter Verlaek
cbc8b38a91
[ws-daemon] Add OWI to logs (#18017) 2023-06-22 21:44:12 +08:00
Thomas Schubart
20164cbb4a
[wsman-mk2] Simplify condition checking (#17961) 2023-06-17 22:59:07 +08:00
Thomas Schubart
4584f8fda9
[wsman-mk2] Change default class to g1-standard (#17950)
* [wsman-mk2] Change default class to g1-standard

* [preview] Update workspace classes
2023-06-15 20:23:05 +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
2cab1406dd
[ws-manager-mk2] Remove persistent volume claim feature (#17860)
* [ws-daemon] Remove PVC

* [installer] Remove PVC

* [workspacekit] Remove PVC

* [content] Remove PVC

* [preview] Remove PVC

* [wsman-api] Remove PVC

* [ws-daemon-api] Remove PVC

* [workspacekit] Mount workspace directory

* [supervisor] Remove PVC

* [test] Remove PVC

* Fix build
2023-06-13 18:35:04 +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
Thomas Schubart
fe08421325
[ws-daemon] Remove full workspace backup (#17803) 2023-06-01 17:36:06 +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
da50b8ceb6
[ws-manager-mk2] Cleanup and fail workspaces when node disappears (#17599)
* [ws-manager-mk2] Cleanup and fail workspaces when node disappears

* Cache nodes

* Fix test, and reconcile ws when node gets deleted
2023-05-15 22:53:00 +08:00
Wouter Verlaek
bfa7b301b7
[ws-manager-mk2] Fix headless task failures (#17429) 2023-04-28 19:26:36 +08:00
Manuel Alejandro de Brito Fontes
891cd5417d
Update k8s dependencies to v0.26.2 (#17211)
* Update k8s dependencies to v0.26.2

* Update controller-runtime to v0.14.6

* Update cloud storage
 https://github.com/googleapis/google-cloud-go/issues/6857

* Update copy options

* Update wolfi image

* Remove controller-runtime replace directives

* Fix integration tests
2023-04-18 03:59:49 +08:00
Manuel Alejandro de Brito Fontes
27979c9395
Update go dependencies (#17101)
* Update go dependencies

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Update runc to v1.1.5

* Update docker cli to v23.0.2+incompatible

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-04-12 10:03:52 +02:00
Wouter Verlaek
06ec36b564
[ws-manager-mk2] Refactor metrics with EverReady condition (#17114)
* [ws-manager-mk2] Refactor metrics with EverReady condition

* Fix test, default failure message

* Add stop reason metric
2023-04-08 11:57:48 +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
Thomas Schubart
697d81ecbf
[ws-manager-mk2] Introduce experimental mode (#17048)
* [installer] Add experimental mode for mk2

* [wsman-mk2] Use ExperimentalMode flag
2023-03-28 17:56:26 +02:00
Wouter Verlaek
c14a25cfdf
[ws-manager-mk2] Report content init/dispose failures (#17015) 2023-03-27 17:22:25 +02:00
Thomas Schubart
c64c4f3530
[ws-manager-mk2] Rely on controller concurrency mechanism for content init and backup (#16823)
* [wsman-mk2] Replace in memory state handling

* [ws-daemon] Operate on latest workspace CR

* [ws-daemon] Review comments
2023-03-23 16:31:17 +01:00
Wouter Verlaek
57840fc6ed
[ws-manager-mk2] Refactor maintenance mode to end at a timestamp (#16925)
* [ws-manager-mk2] Maintenance until

* Fix configmap

* Always show field

* Remove todo
2023-03-22 16:39:14 +01:00
Manuel Alejandro de Brito Fontes
5b30eb5b8c
Remove unused caCertSecret (#16793)
* Add trust.cert-manager.io for to bundle CA certificates

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Configure CA volume and volumemount in components

* Update ws-manager golden files

* Deploy trust manager in preview

* Remove duplicated volume

* Update installer golden files

* Generate a bundle only for registry-facade

* Update golden files

* Fix initcontainer volume mounts

* Update golden files

* Fix registry-facade certificate

* Update golden files

* Disable skip_verify

* Enable force conflict with apply server side

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

* Avoid random werft namespace errors

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>

---------

Signed-off-by: Manuel de Brito Fontes <aledbf@gmail.com>
2023-03-21 11:44:13 +01:00
Thomas Schubart
42a3602fce
[ws-manager-mk2] Emit events for workspaces and snapshots (#16907)
* [wsman-mk2] Emit workspace events

* [installer] Permissions for events

* [ws-man-mk2] Emit snapshot events

* [installer] Update render tests

* [wsman-mk2] Include review comments
2023-03-20 13:59:12 +01:00
Wouter Verlaek
3a561bf274
[ws-manager-mk2] Check empty ns, delete secrets before finalizer (#16900) 2023-03-20 11:32:12 +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
Wouter Verlaek
311da7324c
[ws-manager-mk2] Add duration validation (#16687) 2023-03-06 18:39: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
Milan Pavlik
e4e05143e2
[baseserver] Initialize tracer with server (#16586)
* [baseserver] Initialize tracer with server

* fix

* Fix

* fix
2023-03-03 14:57:01 +01:00
Wouter Verlaek
bec87139a9
[ws-manager-mk2] Remove headless field (#16611) 2023-03-01 12:14: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
Wouter Verlaek
e62c773362 [ws-manager-mk2] Aborted condition, grace period 2023-02-14 12:04:19 +01:00
Wouter Verlaek
65d5cb2d88 [ws-manager-mk2] Cleanup EverReady condition 2023-02-14 11:28:19 +01:00
Pudong Zheng
377f00cb02 [ws-manager] Add custom closed timeout
Co-authored-by: Wouter Verlaek <wouter@gitpod.io>
2023-02-10 11:16:15 +01:00