summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-13 09:37:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-13 09:37:59 +0000
commit61ca90e0b462bfe69e0b400dfe403bd95281b90f (patch)
treeb3c57a35551c9275f9d6d81e2c12328ac0f394d2 /app/services
parentae6730843ac7f8489d52a79b16cd35d75c7a5852 (diff)
downloadgitlab-ce-61ca90e0b462bfe69e0b400dfe403bd95281b90f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/clusters/applications/destroy_service.rb23
-rw-r--r--app/services/clusters/applications/uninstall_service.rb29
2 files changed, 0 insertions, 52 deletions
diff --git a/app/services/clusters/applications/destroy_service.rb b/app/services/clusters/applications/destroy_service.rb
deleted file mode 100644
index d666682487b..00000000000
--- a/app/services/clusters/applications/destroy_service.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Clusters
- module Applications
- class DestroyService < ::Clusters::Applications::BaseService
- def execute(_request)
- instantiate_application.tap do |application|
- break unless application.can_uninstall?
-
- application.make_scheduled!
-
- Clusters::Applications::UninstallWorker.perform_async(application.name, application.id)
- end
- end
-
- private
-
- def builder
- cluster.public_send(application_class.association_name) # rubocop:disable GitlabSecurity/PublicSend
- end
- end
- end
-end
diff --git a/app/services/clusters/applications/uninstall_service.rb b/app/services/clusters/applications/uninstall_service.rb
deleted file mode 100644
index 50c8d806c14..00000000000
--- a/app/services/clusters/applications/uninstall_service.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-module Clusters
- module Applications
- class UninstallService < BaseHelmService
- def execute
- return unless app.scheduled?
-
- app.make_uninstalling!
- uninstall
- end
-
- private
-
- def uninstall
- helm_api.uninstall(app.uninstall_command)
-
- Clusters::Applications::WaitForUninstallAppWorker.perform_in(
- Clusters::Applications::WaitForUninstallAppWorker::INTERVAL, app.name, app.id)
- rescue Kubeclient::HttpError => e
- log_error(e)
- app.make_errored!("Kubernetes error: #{e.error_code}")
- rescue StandardError => e
- log_error(e)
- app.make_errored!('Failed to uninstall.')
- end
- end
- end
-end