Sets scheduling rules for the container.
Rancher uses Tag based scheduling which is set via container labels.
All options life inside the scheduler
json object.
enable
: Can be set tofalse
to disable creating the scheduling rules without removing them. Defaults totrue
scheduler
: Scheduler to use. Currently the default and only implementation available israncher
same-host
: Setting this totrue
will allow multiple containers to be scheduled on the same host. Defaults tofalse
tags
: Object or array of tags. A host must have these tags set for a container to be scheduled there. Defaults to []- Arrays or numerical object variables will be created as
$VALUE=true
tag rule - non-numerical object variables will be created as
$NAME=$VALUE
tag rule
- Arrays or numerical object variables will be created as
forbid-tags
: Object or array of forbidden tags. seetags
except the host must NOT have these tags. Defaults to []should-not-tags
: Object or array of tags. Prefer hosts which do not have these tags set. Defaults to []
- Schedule all environments on hosts which have the tag
apps=true
and prefer hosts which do not havefallback=true
{
"defaults":{
"scheduler":{
"tags":[
"apps",
],
"should-not-tags":[
"fallback"
]
}
}
}
- Schedule the single environment
test
on hosts which have the tagapps=true
and prefer hosts which do not havefallback=true
{
"environments":{
"test":{
"scheduler":{
"tags":[
"apps",
],
"should-not-tags":[
"fallback"
]
}
}
}
}