Default Scheduler Rule

I have a number of docker hosts registered to Rancher environments that are defined for very specific purposes. For example some of them are for containers that support core infrastructure services and others are actually dedicate proxy/load balancers. So in this case we can consider these as ‘pets’.

In the general case I do NOT want anyone to deploy containers to these (other than the core DevOps team). These hosts have a label identifying their type (for arguments sake lets consider the label HOST_TYPE=INFRA). Today I advise our app teams to include a scheduling rule that declares HOST_TYPE != INFRA, and we keep an eye on things so in case anyone forgets we can apply the rule retrospectively and thus move the containers to the group of general use hosts.

But it would be more convenient if I could set some DEFAULT schuling rules which exclude deployment to any of the HOST_TYPE values that I want to keep for core services, so if no scheduling rule is applied explicitly the default one would still apply.

  1. Is this possible (and if so how) ?
  2. If it is possible, but another scheduling rule is applied to a stack/service, would the effect be cummulative (i.e. the DEFAULT rule would apply AND the additional rules specific to the stack).

Kind Regards

Fraser.

  1. Nope. Depending on their use you can put them in a different Environment, but that wouldn’t be appropriate if it were e.g. a load balancer shared by the other services users create.
  2. Multiple scheduling rules are ANDed together so that only hosts that match all of them are eligible. If no hosts match and there are soft constraints (“should [not] have” vs “must [not] have”) then those are dropped one at a time and the remaining rules are re-run.

Thx Vincent. Re: default scheduler rule, you are right on both counts. We do run ext proxy/lbs in each environment, and, we need those in each environment to support ALL the services therein.

How would I go about registering this as a feature request ?