-
Notifications
You must be signed in to change notification settings - Fork 84
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
scaleutils: add nodeselector package to select nodes suitable for termination #435
Conversation
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.
one array bounds question and a few comments 👍
}, | ||
{ | ||
inputCfg: map[string]string{ | ||
"node_selector_strategy": "aliens", |
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.
👽 👽 👽
316c940
to
8395e9a
Compare
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.
Minor comments, but it seems to be working 🎉
closes #417
This work allows operators to specify the strategy which is used to select nodes for termination during a scale in action. Up until now, the Nomad Autoscaler would simply pick nodes from the top of the list as returned from the Nomad node list API endpoint. This method is still included and is now known as
newest_create_index
.In order to explicitly configure the selector behaviour, a new policy target configuration option
node_selector_strategy
has been made available. This config option is parsed by the scaleutils helper and therefore is available to all cluster target plugins which utilise it.In the absence of an operator configured option, the value defaults to
least_busy
. This strategy calculates the percentage allocation of each node in the pool, selecting those which have the lowest value and therefore are allocated the least amount of resources. The resources are CPU and memory.The second selector strategy available is
empty
. This strategy will only select nodes for termination that do not have non-terminal allocations. This is ideal for worker pools running batch workloads which should not be interrupted or migrated.Admin notes: