-
Notifications
You must be signed in to change notification settings - Fork 188
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
Conversation
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." | ||
); |
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.
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; |
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.
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
Definitely open to different logic, thresholds, etc. Just wanted to get something out here to start a discussion around.