Automatic merge from submit-queue
Cluster-autoscaler: support unready nodes in scale down
Use a different unneeded time threshold for unready nodes (to either allow debugging or make node/cluster healing faster).
Ref: #2228#2229
cc: @jszczepkowski @fgrzadkowski @piosz
Automatic merge from submit-queue
Cluster-autoscaler: move ToBeDeleted taint functions to utils
Minor cleanup. No much of new code.
cc: @jszczepkowski @fgrzadkowski
Automatic merge from submit-queue
Cluster-autoscaler: add stateful set support in drain.
This change will have to be cherry-picked to 0.4.0 release of CA (and K8S 1.5).
cc: @fgrzadkowski @piosz @jszczepkowski
Automatic merge from submit-queue
Provide multiple strategies for choosing which Node Group to increase
As per #1921, the current cluster-autoscaler chooses a node group to increase at random among the groups that can fit at least one pod. This expands this to two additional strategies:
- Most Pods - choose the node group that can schedule the most pods, usually due to predicate rules
- Least Waste - choose the node group that has the least remaining CPU resources after a scale up, and if that is tied, the least remaining Memory
In the event of a tie, both of these strategies fall back to the current Random method.
This probably needs test coverage, to move to its own package, and there could be some weirdness in the algorithms as it needs manual testing.
Looking mostly to see if I'm on the right track and will proceed after.
Automatic merge from submit-queue
ClusterAutoscaler: context object to keep non-changing objects
+ flag with max graceful termination for scale down.
cc: @fgrzadkowski @piosz @jszepkowski
Automatic merge from submit-queue
Cluster-Autoscaler: add node drain logic
Currently a node is removed without any notice and pods that live on the node killed without graceful termination. This PR adds drain logic to scale down.
cc: @fgrzadkowski @piosz @jszczepkowski
Automatic merge from submit-queue
Fixed a couple of typos in cluster-autoscaler
This pull request fixes a couple of typos/grammatical errors in the logging output of the cluster-autoscaler addon
Automatic merge from submit-queue
Cluster-autoscaler: delete empty nodes in bulk
Regular nodes are deleted one by one. However, if a nodes are completely empty (only daemonsets or manifest-run pods) then they can easily be deleted in bulk. With this PR in scale down we will first try to delete empty nodes in bulk and if that fails, we will proceed with regular node deletion.
cc: @fgrzadkowski @piosz @jszczepkowski
Automatic merge from submit-queue
Cluster-autoscaler: use binpacking estimation algorithm by default
Should actually be better than basic for most of the users:
* If only 1 type of pod is pending CA is guaranteed to provide the best estimate.
* Only 1 iteration is needed to grow cluster to correct state.
* It should not be much worse than multi-phase iterative algorithm for mixed pending pods.
cc: @fgrzadkowski @piosz @jszczepkowski