Merge "Default min-ready to 0"

This commit is contained in:
Zuul 2018-02-09 06:53:27 +00:00 committed by Gerrit Code Review
commit a57a78657e
2 changed files with 11 additions and 5 deletions

View File

@ -107,10 +107,16 @@ written to run on nodes of a certain label. Example::
this is exceeded the node will be deleted. A value of 0 disables this.
Defaults to 0.
``min-ready`` (default: 2)
Minimum instances that should be in a ready state. Set to -1 to have the
label considered disabled. ``min-ready`` is best-effort based on available
capacity and is not a guaranteed allocation.
``min-ready`` (default: 0)
Minimum number of instances that should be in a ready
state. Nodepool always creates more nodes as necessary in response
to demand, but setting ``min-ready`` can speed processing by
attempting to keep nodes on-hand and ready for immedate use.
``min-ready`` is best-effort based on available capacity and is
not a guaranteed allocation. The default of 0 means that nodepool
will only create nodes of this label when there is demand. Set
to -1 to have the label considered disabled, so that no nodes will
be created at all.
.. _diskimages:

View File

@ -146,7 +146,7 @@ def loadConfig(config_path):
l.name = label['name']
newconfig.labels[l.name] = l
l.max_ready_age = label.get('max-ready-age', 0)
l.min_ready = label.get('min-ready', 2)
l.min_ready = label.get('min-ready', 0)
l.pools = []
for provider in config.get('providers', []):