Prevent service from scaling

We are checking Rancher applicability for our needs and so far so good except one specifics of our stack - we need to guarantee that one service is a “singleton”. Is it currently possible to set it somehow - i.e. remove “scaling up” functionality for one service only?

The only guaranteed way currently is to run a single standalone container (in the Infrastructure tab) instead of a service.

With a service the container will get automatically scheduled to a different host if the one it’s on disconnects from Rancher (or enough health checks to the container fail, if configured).

Often this is because it’s dead, but we have no way of knowing for sure whether the old container is still actually in fact running out there or not.

thank you for the workaround! Ideally I’d like to see a label which can enforce scaling limits or something like that. Thanks once again!

We just released 0.41 which contains our Service Selector feature. This will allow you create a create a service (empty one as well), add a selector label, and allow any created containers with a label that fulfills the “selector” label to automatically join that service. You can then take advantage of the DNS service discovery feature. By doing this, the scale functionality is no longer applicable as it is controlled by labels.

@sergeleschinsky I’ve created this Github issue to track your request.