Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Cunha <j.a.cunha@gmail.com>2019-07-16 19:11:10 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2019-07-16 19:11:10 +0300
commitbd31c4be0d7cfcb0c2cc887a66c313c592ce8e88 (patch)
tree562be9be26b3bfdcba69e0ea1400f772a149e96b /app/models/clusters/applications
parentcca71da16ac12d3df787de3f3a0cd60d30649a1d (diff)
Enable GitLabb runner to be uninstalled from cluster
- Set as uninstallable app - Update docs - Adjust specs
Diffstat (limited to 'app/models/clusters/applications')
-rw-r--r--app/models/clusters/applications/runner.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb
index f0256ff4d41..6ae8c3bd7f3 100644
--- a/app/models/clusters/applications/runner.rb
+++ b/app/models/clusters/applications/runner.rb
@@ -29,13 +29,6 @@ module Clusters
content_values.to_yaml
end
- # Need to investigate if pipelines run by this runner will stop upon the
- # executor pod stopping
- # I.e.run a pipeline, and uninstall runner while pipeline is running
- def allowed_to_uninstall?
- false
- end
-
def install_command
Gitlab::Kubernetes::Helm::InstallCommand.new(
name: name,
@@ -47,6 +40,14 @@ module Clusters
)
end
+ def prepare_uninstall
+ runner&.update!(active: false)
+ end
+
+ def post_uninstall
+ runner.destroy!
+ end
+
private
def ensure_runner