-
Notifications
You must be signed in to change notification settings - Fork 2
feat(vm): add maintenance #1316
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
f2ce212
to
b6449fd
Compare
Workflow has started. The target step completed with status: cancelled. |
Workflow has started. The target step completed with status: failure. |
Workflow has started. The target step completed with status: failure. |
Signed-off-by: Yaroslav Borbat <[email protected]> Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]> Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Workflow has started. The target step completed with status: failure. |
Workflow has started. The target step completed with status: failure. |
Workflow has started. The target step completed with status: cancelled. |
Workflow has started. The target step completed with status: failure. |
@@ -0,0 +1,123 @@ | |||
/* | |||
Copyright 2024 Flant JSC |
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.
2025
@@ -45,6 +45,7 @@ type Validator struct { | |||
func NewValidator(ipam internal.IPAM, client client.Client, service *service.BlockDeviceService, log *log.Logger) *Validator { |
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.
Remove pls ipam internal.IPAM
, it's unused
@@ -0,0 +1,54 @@ | |||
/* | |||
Copyright 2024 Flant JSC |
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.
2025
} | ||
|
||
// Hide all other conditions when in maintenance mode | ||
if changed.Status.Conditions != nil { |
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.
Just
changed.Status.Conditions = []metav1.Condition{maintenance}
Signed-off-by: Daniil Loktev <[email protected]>
Signed-off-by: Daniil Loktev <[email protected]>
Workflow has started. |
Signed-off-by: Daniil Loktev <[email protected]>
This PR introduces a new Maintenance condition for VirtualMachine resources that enables safe VM state manipulation during clone and restore operations. The maintenance mode ensures the VM is stopped and prevents the controller from creating or managing underlying resources (KVVM, KVVMI, Pods). During VM clone or restore operations, we need to ensure: - The VM is gracefully stopped - No underlying resources (KVVM, KVVMI, Pods) exist or get recreated - The VM controller doesn't interfere with the clone/restore process Signed-off-by: Yaroslav Borbat <[email protected]> Signed-off-by: Daniil Loktev <[email protected]> Co-authored-by: Daniil Loktev <[email protected]>
Description
This PR introduces a new
Maintenance
condition for VirtualMachine resources that enables safe VM state manipulation during clone and restore operations. The maintenance mode ensures the VM is stopped and prevents the controller from creating or managing underlying resources (KVVM, KVVMI, Pods).Why do we need it, and what problem does it solve?
During VM clone or restore operations, we need to ensure:
What is the expected result?
Checklist
Changelog entries