-
Notifications
You must be signed in to change notification settings - Fork 2
chore(vm): increase performance #1654
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis pull request refactors the VirtualMachine controller architecture to improve performance by introducing a new 'supervm' controller that dynamically manages per-namespace VM controllers, optimizes logger instantiation, and restructures related code and tests accordingly. Sequence diagram for dynamic creation of per-namespace VM controllerssequenceDiagram
participant S as "supervm Controller"
participant Q as "Request Queue"
participant VM as "Namespaced VM Controller"
participant K as "Kubernetes Manager"
actor U as "User"
U->>S: Create/Update VirtualMachine in namespace N
S->>Q: Push reconcile.Request for namespace N
S->>S: Check if controller for N exists
alt Controller for N does not exist
S->>K: Setup new Namespaced VM Controller for N
S->>VM: Pass queue for namespace N
S->>Q: Store queue for N
end
S->>Q: Push reconcile.Request to queue for N
Q->>VM: Forward reconcile.Request
VM->>K: Reconcile VirtualMachine
Class diagram for logger instantiation refactorclassDiagram
class Logger {
+With(...)
}
class Factory {
+func(controllerName string) *Logger
}
Logger <|-- Factory
class logFactory_Factory {
+func(controllerName string) *Logger
}
logFactory_Factory --|> Logger
Class diagram for supervm Reconciler and HandlerclassDiagram
class Reconciler {
-client: Client
-handlers: []Handler
+SetupController(...)
+Reconcile(...)
+factory()
+statusGetter(obj)
}
class Handler {
+Handle(ctx, vm)
}
Reconciler --> Handler : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
ff29e41 to
c0ebfbf
Compare
Signed-off-by: Isteb4k <dmitry.rakitin@flant.com>
c0ebfbf to
63a652b
Compare
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Isteb4k <dmitry.rakitin@flant.com>
Signed-off-by: Isteb4k <dmitry.rakitin@flant.com>
a752e24 to
35d56b5
Compare
Description
Checklist
Changelog entries