Scale-application vs application requirements

Is there a way for a charm to decline scaling requests? For example, when scaling Mattermost it should be done with clustering enabled, which requires a licence. It’d be nice if the user got some kind of feedback if they try to scale the application without having those in place.

Currently there’s no way for a charm to act as a gatekeeper to control when scaling out is allowed.
Off the top of my head, one thing can could be done today is to have additional units set their status as “blocked” with a suitable message if clustering is not enabled.

1 Like

Ah well, that seems like the way go for now. Thanks!

I couldn’t find a suitable one, so I’ve filed a Juju bug. Probably it can just be Wishlist or Low!

The metadata.yaml

limit: N

Would be where I use to think it would be a good directive but it’s used for limiting relations unfortunately

@cory_fu might have an idea