Scale deployments directly from the environment page
UX: ? FE: ? BE: @matteeyah
Auto DevOps can leverage variables to define how many pods should be created during a deployment (
CANARY_PRODUCTION_REPLICAS, etc.): https://docs.gitlab.com/ee/topics/autodevops/#advanced-replica-variables-setup.
We should espose this variables in the CI/CD > Environments page, and allow users to easily change this values in the UI. After the change, we can automate the redeployment to apply the new number of requested pods.
### Original proposal
Scale deployment link is added next to the
Instances title for each environment:
When the link is clicked, the deploy board section is expanded inline to show the scaling options. The
Scale deployment link is no longer available since we have entered scaling mode.
A message is shown at the top of the new section to inform users that this feature only works with certain configurations:
Please, make sure your deployment job is compatible with scaling. Read our documentation for more details.
TODO: Determine the documentation link
Below, the new option is shown. The description text informs the user that this change will affect deployments that happen after they save:
Increase or decrease the number of instances used for this environment. This will affect future deployments.
The actual value is edited through a text field with arrow controls for easy modification.
Finally, there is a
If the user collapses the environment, this section should be collapsed along with the rest of the deploy board.
We will check whether the configuration is compatible with deployment scaling:
environment_scalingthat is gonna have all scaling options,
We gonna update
enviroment_scalingonce show the page,
We forbid updating
environment_scalingif you have
PRODUCTION_REPLICAS(for ex.) set as Secret Variable, as this is conflicting,
We show the error message, linking to edit of Secret Variables, the user deletes them, save, gets back to this page, clicks save and it's done,
environment_scalingto be included in variables sent to the runner.
If we detect that the configuration is incompatible, the default message is hidden and we show this message in a warning box:
Secret variables will link to
TODO: Determine which docs page to link to for the second anchor
The field and
Save button will be disabled.
The content of the field will be taken from the 'conflicting' variable.