-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ws-manager-mk2 - or what if we built it today? #9596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/werft run 👍 started the job as gitpod-build-cw-ws-manager-mk2.41 |
9d728da
to
068908b
Compare
0f56fb6
to
3c0d700
Compare
853e298
to
c701b07
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
c701b07
to
72c7ed8
Compare
5b22eb4
to
7b63891
Compare
/werft run 👍 started the job as gitpod-build-cw-ws-manager-mk2.63 |
6141beb
to
b13d9e2
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
7faac78
to
fa3e80b
Compare
32b1268
to
225c018
Compare
@@ -10,4 +10,4 @@ packages: | |||
- "go.sum" | |||
config: | |||
packaging: library | |||
dontTest: false | |||
dontTest: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking, question
@Furisto why disable? Just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah was not aware of that but it makes sense. Currently the test we have (for the webhook) fails. Webhooks will be removed with the next PR which means the test will be removed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Webhooks will be removed with the next PR which means the test will be removed as well.
Do we have a written reason why this is being done? What's the replacement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a suggestion from @csweichel. Currently there is just nothing that we would want to validate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's talk about that in the next sync. One of the goals of the webhook is to avoid persistence with invalid values and wasting sync loops in the controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Furisto was the thought to use CEL, instead of webhooks to do validation? This article suggests we cannot use CEL until Kubernetes 1.25 (we're currently on 1.23, and cannot move to 1.24 yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/unhold |
Description
This PR is the initial work for getting ws-manager-mk2 off the ground. It can start workspaces and do initialize the content. Communication between ws-manager, ws-daemon and ws-proxy is done through a workspace CRD. This is not a production grade implementation yet. For milestones see the milestone plan. Features not yet working will be added in subsequent PRs.
PoC: ws-manager-mk2 - Watch Video
When we built ws-manager more then three years ago, kubebuilder wasn't a thing and writing Kubernetes controllers was hard(er). Also, we didn't know too much about Kubernetes at the time.
This PR shows how ws-manager would look like if it were written as a Kubernetes controller, CRDs and all. The main takeway: it terrifyingly simplifies things. The code is orders of magnitudes easier to read and maintain compared to what we have today.
If we just look at the lines of code (a weak, but easily quantifiable proxy for complexity):
The version in this branch is nearly happy-path feature complete:
I've also extended ws-proxy to use the workspace CRs as workspace info source.
There's a bunch of things missing in this branch:
Ok, but why?
Other than the considerable reduction in complexity this approach gets us in ws-manager,
Do you not have better things to do?
This was primarily an evening/weekend project - less than 20h have gone into this.
How to review
Release Notes
Relates with #11416
/werft with-vm=true
/werft with-preview=true
/werft with-wsman-mk2=true