Add integration tests for machine preservation - #1124
Conversation
|
/assign |
thiyyakat
left a comment
There was a problem hiding this comment.
Thanks for adding these much-needed tests! 👍
|
@aaronfern , should we have some IT to test reduction of |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
@thiyyakat Okay, sure, makes sense. I will add this test |
thiyyakat
left a comment
There was a problem hiding this comment.
Thanks for adding the test and addressing the comments. Just a few nits.
thiyyakat
left a comment
There was a problem hiding this comment.
There are a few if-else if blocks that can be converted to if-else blocks. PTAL.
bc0917f to
573b83f
Compare
…ailedMachineMax is reduced Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
…tests Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 9738282a5d4a8fa09e00c07d376b4d8fa15ea996 |
thiyyakat
left a comment
There was a problem hiding this comment.
Just a few minor nits. Looks good to me otherwise. 👍
Signed-off-by: aaronfern <aaron.francis.fernandes@sap.com>
|
Thanks for the changes and for addressing multiple rounds of review comments! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: f27c3ea5e1015be55bacf9df2942f6de4928ce95 |
What this PR does / why we need it:
This PR adds integration tests for machine preservation.
The following cases have been covered:
Auto Machine Preservation:
preserve=falseannotation is presentpreserve=falseannotation is addedAutoPreserveFailedMachineMaxis reduced, failed machines that exceed the newAutoPreserveFailedMachineMaxcount are moved to terminatingManual Machine Preservation:
when-failedannotation and move back toRunningphase when it recoverswhen-failedwhen-failedannotation should be preserved when failed even ifautoPreserveMaxis crossedWhich issue(s) this PR fixes:
Fixes partially #1123
Special notes for your reviewer:
To trigger machine failures, this PR takes the approach of applying a validating admission policy to block all kubelet updates. This causes kubelet not to be able to update it's node lease or it's node status and results in the node going into the
Unknownstate.This is a k8s native way of achieving node failures and has no dependency on the provider or any other node/worker-pool setting
This might not work with the virtual provider of the virtual provider does not use kubelets, but imo this can be considered a special case and can be tackled in a separate PR
Release note: