131 Commits

Author SHA1 Message Date
Gero Posmyk-Leinemann
e9aae6e497
[docker-up] Auto-login dockerd if GITPOD_IMAGE_AUTH is set (#20586)
* [docker-up] Minor fixes and add tests

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob] Tests&fixes from an experimental PR

Tool: gitpod/catfood.gitpod.cloud

* [supervisor, ws-manager] Write docker credentials into client config file if passed into workspace

Tool: gitpod/catfood.gitpod.cloud

* [server] Introduce project.settings.enableDockerdAuthentication and expose it on the API

Tool: gitpod/catfood.gitpod.cloud

* [dashboard] Add "Docker registry authentication" toggle under projects/env vars

Tool: gitpod/catfood.gitpod.cloud

* [server] Guard project.settings.enableDockerdAuthentication by org write_settings permission

Tool: gitpod/catfood.gitpod.cloud

* review comments with cleanup + small fixes

Tool: gitpod/catfood.gitpod.cloud
2025-02-12 05:16:48 -05:00
Kyle Brennan
58c9a1808a
[ws-manager-mk2] update to support k8s 0.30 API (#20580)
* [go components] Fixed "go test ./..." in various components

Tool: gitpod/catfood.gitpod.cloud

* [go components] Update k8s 0.29.3 -> 0.30.9 API

 - update the go-update-wc-deps.sh script to handle the brunt of that transition
 - fixes Maintenance- + Subscriber-Controller
 - document steps

Tool: gitpod/catfood.gitpod.cloud

* [ws-manager-mk2] Decide how to apply appamor config based on serverversion to support k8s 1.30+

Tool: gitpod/catfood.gitpod.cloud

* [gpctl] Missing go mod tidy

Tool: gitpod/catfood.gitpod.cloud

* Replace vulnerable outcaste-io/badger/v3 with original dgraph-io/badger/v3

Tool: gitpod/catfood.gitpod.cloud

* more go mod tidy

Tool: gitpod/catfood.gitpod.cloud

* [image-builder-bob, installer] Select the correct version of containerd....

Tool: gitpod/catfood.gitpod.cloud

---------

Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>
2025-02-07 03:58:22 -05:00
mustard
f0763afc35
Auto-configure default JVM Xmx based on workspace resources (#20536)
* Auto-configure default JVM Xmx based on workspace resources

* Add max xmx and unit tests
2025-01-22 12:37:12 -05:00
iQQBot
b77f687492
[ws-daemon] start backup even pod still report the container is running after 5 minutes (#20382) 2024-11-22 05:13:59 -05:00
Gero Posmyk-Leinemann
355ece1849
[ws-manager] don't ever set PodRejected if WorkspaceConditionEverReady=true (#20372) 2024-11-15 09:33:53 -05:00
Gero Posmyk-Leinemann
99cc66b7cf
[ws-manager] Re-create workspace pods on rejection (#20243)
* [ws-manager] Re-create workspace pods (incl. test)

* [gpctl] Fix "workspaces list"

* [ws-daemon, ws-manager] Review comments, logging cleanups and ordering fix

* [dev/rejector] Add the tool we use to test PodRejection under "dev"

* [bridge] Log nested status shape (and properly scrubbing it)
2024-11-15 07:28:54 -05:00
Kyle Brennan
ca933cb63b
[ws-manager-mk2] include nodeName on failure (#20252) 2024-10-02 08:31:18 -04:00
Kyle Brennan
a05d63359f
[ws-manager-mk2] log the stop reason (#20059) 2024-07-23 14:40:32 +02:00
Huiwen
1237732cf9
Fix main build (#19865) 2024-06-07 19:53:18 +08:00
Sven Efftinge
07833a3b18
[java] add java ops for processor count and container support (#19846)
* [java] add java ops for processor count and container support

* remove wiping java_tool_options
2024-06-07 17:37:18 +08:00
Pudong
c465cdebc3
[ws-manager-mk2] fix test (#19816) 2024-05-31 15:17:12 +08:00
Pudong
9e07d3cabd
Backup prebuild logs even it's fail (#19808)
* Backup prebuild workspace even it's fail

* skip backup content if headless task failed
2024-05-31 00:27:11 +08:00
Gero Posmyk-Leinemann
b75162c5bb
[ws-manager-mk2] Make WorkspaceRunningCondition.LastTransitionTime stable (#19698) 2024-05-03 20:53:43 +08:00
Kyle Brennan
0d1d0bd9f3
[ws-manager-mk2] logging improvements (#19635)
* [ws-manager-mk2] logging improvements

* Record phase transitions, rather record phase each time we reconcile
* Add OWI to log instances

Also, avoid logging workspace name in workspace_types.go, as it contains org and repo info.

* Fix logger WithValues

* Include OWI with reconciling workspace messages

* Include OWI with timeout logs

* Cleanup

* Rely on OWI on the context

Thanks, @WVerlaek!
2024-04-18 20:52:56 +02: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
Wouter Verlaek
c5ba13cdf2
[ws-daemon] Take backup once container has stopped (#19411) 2024-02-09 17:02:51 +02: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
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
Wouter Verlaek
c5d296f8e2
[ws-manager-mk2] Refactor node utilization to count by pod resource requests (#19160) 2023-11-28 22:04:06 +02:00
Wouter Verlaek
237578143b
[ws-manager-mk2] Add workspace pending time histogram (#19154) 2023-11-28 14:04:06 +02:00
Wouter Verlaek
f9e6a632a6
[ws-manager-mk2] Add node utilization metrics (#19105)
* [ws-manager-mk2] Node capacity metrics

* CPU use millis, fix stopped, collect

* Refactor to utilization metric, rm total, add type
2023-11-23 16:46:01 +02:00
Pudong
81ff3d16e4
[ws-manager-mk2] redact log (#18906)
* update to logrusr v4

* Add DeepCopyStruct to scrubber

* use DeepCopyStruct to scrub log

* mark wrokspace.stauts.url redact
2023-10-16 13:48:23 +03:00
Aleksandar
5dc4998b45
[eng-874] workspace creating time metric (#18916)
* [eng-874] workspace creating time metric

* calculate creating time from ts, add tests

* rm unused field

* copy pasta

* wrong phase
2023-10-13 13:33:21 +03:00
Manuel Alejandro de Brito Fontes
258651f923
Filter subscriber reconciler events (v2) (#18696)
* Filter subscriber reconciler events (v2)

* Ignore LastActivity
2023-09-12 20:54:52 +02:00
Wouter Verlaek
9ff81ee69e
Add maintenance metric (#18703) 2023-09-12 13:25:52 +02:00
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
Manuel Alejandro de Brito Fontes
887a8b55e4
Avoid ws-manager-mk2 metrics duplication (#18625) 2023-09-04 19:44:01 +02:00
Manuel Alejandro de Brito Fontes
7909192715
Reduce ws-manager-mk2 logs verbosity (#18626) 2023-09-04 15:41:01 +02:00
Manuel Alejandro de Brito Fontes
63c0c26c32
Remove SetControllerReference duplication (#18652) 2023-09-04 15:10:01 +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
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
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
Kyle Brennan
fb9e503943
[ws-manager-mk2] test create w/o git config (#18475) 2023-08-10 21:25:36 +02:00
Christian Weichel
fedfc4adbe
Make Git env vars independent of custom certs (#18474) 2023-08-10 00:08:35 +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
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
Thomas Schubart
20164cbb4a
[wsman-mk2] Simplify condition checking (#17961) 2023-06-17 22:59:07 +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
e1ddb2e5cc
[ws-manager-mk2] Test prebuilds and imagebuilds (#17899)
* [ws-daemon] Test prebuilds and imagebuilds

* [wsman-mk2] Ensure restore metrics are recorded
2023-06-12 16:58:02 +08:00
Wouter Verlaek
d41a38ba83
[ws-manager-mk2] Log conflict errors as info (#17840)
* [ws-manager-mk2] Log conflict errors as info

* Fix error field

* Requeue after small delay on conflict
2023-06-08 15:54:58 +08:00
Thomas Schubart
daef337abc
[wsman-mk2] Improve error message when removal of finalizer fails (#17749) 2023-05-25 23:47:59 +08:00
Thomas Schubart
a1d2d66d99
[wsman-mk2] Log workspace failure reason (#17752) 2023-05-25 23:43:59 +08:00
Wouter Verlaek
8861acb8a3
[ws-manager-mk2] Remove maintenance CM from installer (#17693) 2023-05-23 17:05:57 +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
Manuel Alejandro de Brito Fontes
09a354264d
Increase workspace TerminationGracePeriodSeconds to avoid issues of node removals (#17586) 2023-05-13 03:14:57 +08:00
Wouter Verlaek
85324b6951
[ws-manager-mk2] Refactor lastActivity (#17548) 2023-05-11 15:29:56 +08:00