diff options
author | João Cunha <j.a.cunha@gmail.com> | 2019-07-16 19:11:10 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-07-16 19:11:10 +0300 |
commit | bd31c4be0d7cfcb0c2cc887a66c313c592ce8e88 (patch) | |
tree | 562be9be26b3bfdcba69e0ea1400f772a149e96b /app/models/clusters/applications | |
parent | cca71da16ac12d3df787de3f3a0cd60d30649a1d (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.rb | 15 |
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 |