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

Prevent accidental large scale downs #2275

Merged
merged 9 commits into from
Apr 1, 2022
Merged

Conversation

pschoenfelder
Copy link
Contributor

Definitely open to different logic, thresholds, etc. Just wanted to get something out here to start a discussion around.

Comment on lines 1248 to 1256
checkBadRequest(
!scaleDownExceedsAbsoluteMax,
"Cannot scale down by more than %s instances at a time",
10
);
checkBadRequest(
!(previousScale.get() > 10 && scaleDownExceedsRelativeMax),
"Cannot scale down by more than half of current instances."
);
Copy link
Member

Choose a reason for hiding this comment

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

Can these err messages have '...without explicit acknowledgement' or something like that on them? Make it obvious what field has to be set


if (previousScale.isPresent() && !request.getLargeScaleDownAcknowledged()) {
boolean scaleDownExceedsAbsoluteMax =
previousScale.get() - request.getInstancesSafe() > 10;
Copy link
Member

Choose a reason for hiding this comment

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

Should we make the 10 configurable? Think that's my only other comment on this one. Easier to change yaml and redeploy than to rebuild

@pschoenfelder pschoenfelder merged commit 3b120a9 into master Apr 1, 2022
@pschoenfelder pschoenfelder deleted the deploy-validation branch April 1, 2022 15:02
@ssalinas ssalinas added this to the 1.5.0 milestone May 4, 2022
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.

None yet

2 participants