Skip to content
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

Early cordon #405

Merged
merged 41 commits into from
Dec 5, 2023
Merged

Early cordon #405

merged 41 commits into from
Dec 5, 2023

Conversation

shreyas-badiger
Copy link
Collaborator

@shreyas-badiger shreyas-badiger commented Nov 9, 2023

Currently, upgrade-manager supports 2 different strategies:
Eager mode - Eagerly wait for replacement nodes and only then drain & terminate the previous instances.
Lazy mode - Rotate (drain and terminate) the desired number of nodes without waiting for the replacement nodes.

In these two strategies, we cordon only the nodes that are in the current batch (batch size is determined by maxUnavailable mentioned in the RollingUpgrade CR. By default maxUnavailable=1)

While the upgrade is in progress, the remaining older nodes that are not yet considered in the node-rotation batch, might have newer deployments / pods scheduled.

These newly scheduled pods could have yet another restart when the underlying older nodes are considered for rotation.
There is also an added time for draining these nodes with additional new pods.

With the approach in PR, we will cordon all the nodes in the respective IG when a rollingUpgrade CR is being processed. The newer pods will always scheduled on newer nodes when an upgrade is in progress.

Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (1201813) 39.09% compared to head (5c6287d) 43.75%.

Files Patch % Lines
controllers/upgrade.go 37.77% 26 Missing and 2 partials ⚠️
controllers/rollingupgrade_controller.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
+ Coverage   39.09%   43.75%   +4.65%     
==========================================
  Files           7        7              
  Lines         931     1104     +173     
==========================================
+ Hits          364      483     +119     
- Misses        540      575      +35     
- Partials       27       46      +19     
Flag Coverage Δ
unittests 43.75% <34.00%> (+4.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shreyas-badiger shreyas-badiger marked this pull request as ready for review November 20, 2023 18:35
@shreyas-badiger shreyas-badiger requested review from a team as code owners November 20, 2023 18:35
tekenstam and others added 8 commits November 20, 2023 10:38
Signed-off-by: Todd Ekenstam <[email protected]>
Signed-off-by: sbadiger <[email protected]>
* Process drain-failures at the end
Signed-off-by: ssheladiya <[email protected]>
Signed-off-by: sbadiger <[email protected]>
Signed-off-by: sbadiger <[email protected]>
Signed-off-by: sbadiger <[email protected]>
Signed-off-by: sbadiger <[email protected]>
Signed-off-by: sbadiger <[email protected]>
@shreyas-badiger shreyas-badiger changed the title Early cordon [DRAFT] Early cordon Nov 20, 2023
@shreyas-badiger shreyas-badiger changed the title [DRAFT] Early cordon Early cordon Nov 21, 2023
controllers/upgrade.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@shaoxt shaoxt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shreyas-badiger shreyas-badiger merged commit c2fdb37 into keikoproj:master Dec 5, 2023
3 of 4 checks passed
@shreyas-badiger shreyas-badiger mentioned this pull request Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants