-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Retrieve supported workspace classes from workspace cluster #11010
Conversation
fbfb0c5
to
0ad1a33
Compare
@@ -42,6 +42,11 @@ export class WorkspaceClusterDBImpl implements WorkspaceClusterDB { | |||
return repo.findOne(name); | |||
} | |||
|
|||
async findAll(): Promise<WorkspaceCluster[]> { | |||
const repo = await this.getRepo(); |
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.
I added this in addition to findFiltered because findFiltered does not return the tls config which we need to authenticate against the ws-manager endpoint
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.
Jep. We did so to reduce traffic (bc it turned out to be a perf problem). See comment below.
/hold |
0ad1a33
to
b33e19a
Compare
Removed myself and workspace team from reviewers, since this PR does not contain any files that we are code owners of. |
FYI: Thomas and I had a quick sync, aligned and discussed some minor changes. @Furisto Please ping for re-review! 🙏 |
b33e19a
to
cbb2f6e
Compare
cbb2f6e
to
53bc409
Compare
53bc409
to
3f12f4c
Compare
@geropl ping |
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.
Changes on Team Self-Hosted owned files look good. Approving to unblock the merge after being reviewed by the other teams.
/werft run 👍 started the job as gitpod-build-fo-register-cluster.11 |
@Furisto I'm currently reviewing. Can you provide me the tls config for wsman? 🙏 |
3f12f4c
to
b85b9aa
Compare
@Furisto I received the credentials for your new VM. After setting everything up I still see no update of the admission constraints:
Could it be that the ws cluster is missing the workspace classes config? 🤔 |
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.
Turns out the admissionsConstraint is properly updated which we can verify by accessing the DB directly. ✔️
gpctl
has to be taught to express workspaceClass admissionConstraints, but that's out-of-scope and worth a follow-up. 🧘
/unhold |
Description
Note: This is a stacked PR that depends on #10982
During registration of a workspace cluster the workspace classes that are supported by this cluster will be fetched from the DescribeCluster endpoint of ws-manager. They are also fetched in a configurable interval (currently 60 seconds) so that updates to the supported classes are propagated to the meta side.
I have added a feature flag, so that this change can be deployed even if the new endpoint from #10982 has not been deployed to workspace clusters yet.
Related Issue(s)
Partially fixes ##10842
How to test
Currently the feature flag (workspace_classes_backend) is active, so with debug logs activated (gpctl debug logs ws-manager-bridge) you should see messages like
reconciling workspace classes...
in the log output. After disabling the flag and restarting ws-manager-bridge you should not see any messages.Registration of a workspace cluster can be done with
gpctl clusters register --name ws-cluster1 --hint-cordoned --hint-govern --tls-path ./wsman-tls/ --url 34.77.51.162:8081 --kubeconfig ./meta-cluster
. After that in the admissionConstraints column of d_b_workspace_cluster you should see an entry similar to this:You can create a workspace cluster with workspace preview. I already have created a VM which you can use for registration. Contact me for the credentials.
Release Notes
Werft options: