AutoDevOps stop action for staging and production environments
Summary
After deploying an application with GitLab AutoDevOps it is not possible to stop the production and staging environment directly in the environment page becouse there is no stop action for those environment.
Problem to solve
The use case is:
- The Operations team that maintains and has access to the Kubernetes cluster wouldn't need to switch the context from GitLab to kubetcl or another tool to stop those deployments.
- A project maintainer or specific users with permissions to stop those environments would stop it directly on GitLab, even though they do not have access to the cluster itself.
In both cases, we win operational efficiency as the principal outcome.
Exploring other tools, such as Argo CD, I've found that they have delete applications buttons that perform the same or similar stop action that I am proposing on this MR.
Steps to reproduce
- Deploy the application using the AutoDevOps template.
2. Go to the Environment Panel and check the deployed application
-
Stop the environment by click on the red square stop button
⏹ and you get the alert -
Proceed anyway and there is any available environment anymore
-
Go to the Stopped environment and you see the production that has been stopped.
-
Click on the arrow button to go and check the environment, is there still alive, even though is listed as stopeed
Example Project
https://cs.gitlabdemo.cloud/ricardo-amarilla-public/security-group/spring-security-project-argo-cd
What is the current bug behavior?
- The stop button
⏹ does not stop the environment and is listed under Stopped if the AutoDevOps template is being used
What is the expected correct behavior?
The stop environment button in production or staging environment should stop
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)