Merge pull request #47510 from mwielgus/allow-zero-size-migs

Automatic merge from submit-queue (batch tested with PRs 47510, 47516, 47482, 47521, 47537)

Allow autoscaler min at 0 in GCE

Allow scaling migs to zero in GCE startup scripts. This only makes sense when there is more than 1 mig. The main use case (for now) will be to test scaling to to zero in e2e tests.
This commit is contained in:
Kubernetes Submit Queue 2017-06-14 20:32:43 -07:00 committed by GitHub
commit fa23890bd9

View File

@ -1247,8 +1247,8 @@ function create-cluster-autoscaler-mig-config() {
# Each MIG must have at least one node, so the min number of nodes
# must be greater or equal to the number of migs.
if [[ ${AUTOSCALER_MIN_NODES} -lt ${NUM_MIGS} ]]; then
echo "AUTOSCALER_MIN_NODES must be greater or equal ${NUM_MIGS}"
if [[ ${AUTOSCALER_MIN_NODES} -lt 0 ]]; then
echo "AUTOSCALER_MIN_NODES must be greater or equal 0"
exit 2
fi