From experimentation (with Juju 2.8.0) it seems that only the initial bundle's "scale" parameter is honoured. A common pattern for our deployments is something that results in the following "juju deploy" command:
juju deploy ${CONFIG_ROOT}/is/mattermost/bundle.yaml
--overlay ${CONFIG_ROOT}/is/mattermost/production/bundle.yaml
--overlay ${CONFIG_ROOT}/secrets-overlay.yaml-local.cfg
I would prefer to set scale to 1 by default and set it to 2 for production. However, it seems that my "scale: 2" in mattermost/production/bundle.yaml is ignored, and of course removing "scale: 1" from mattermost/bundle.yaml results in the default of 0 being applied.
We can work around this by templating the base bundle, but ideally information specific to the production deployment would be confined to the production overlay bundle.
This happens because we re-write scale to num_units during the normalisation phase of reading in a bundle. We then loose the presence of scale from the base bundle and when it applies the new scale it can no longer correctly apply it.
Charm fix (juju fix to follow up shortly): https:/ /github. com/juju/ charm/pull/ 366