Draft
Conversation
Contributor
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
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Changelog entries