summaryrefslogtreecommitdiff
path: root/app/services/clusters
diff options
context:
space:
mode:
authorAlessio Caiazza <acaiazza@gitlab.com>2017-11-07 15:26:14 +0100
committerAlessio Caiazza <acaiazza@gitlab.com>2017-11-07 17:12:41 +0100
commit8ec618a6ede619d9f75279f03c03b24d106c79c7 (patch)
tree7fe8501fb56edf3f33febe5c0d39019160715293 /app/services/clusters
parent760a154a032319a90e15dcf4d54ec1c1cdde9e1c (diff)
downloadgitlab-ce-8ec618a6ede619d9f75279f03c03b24d106c79c7.tar.gz
Add Helm InstallCommand
Diffstat (limited to 'app/services/clusters')
-rw-r--r--app/services/clusters/applications/base_helm_service.rb4
-rw-r--r--app/services/clusters/applications/check_installation_progress_service.rb6
-rw-r--r--app/services/clusters/applications/install_service.rb2
3 files changed, 8 insertions, 4 deletions
diff --git a/app/services/clusters/applications/base_helm_service.rb b/app/services/clusters/applications/base_helm_service.rb
index 68320a3b267..9a4ce31cb39 100644
--- a/app/services/clusters/applications/base_helm_service.rb
+++ b/app/services/clusters/applications/base_helm_service.rb
@@ -20,6 +20,10 @@ module Clusters
def helm_api
@helm_api ||= Gitlab::Kubernetes::Helm.new(kubeclient)
end
+
+ def install_command
+ @install_command ||= app.install_command
+ end
end
end
end
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb
index 69bd3613cce..bde090eaeec 100644
--- a/app/services/clusters/applications/check_installation_progress_service.rb
+++ b/app/services/clusters/applications/check_installation_progress_service.rb
@@ -48,17 +48,17 @@ module Clusters
end
def remove_installation_pod
- helm_api.delete_installation_pod!(app)
+ helm_api.delete_installation_pod!(install_command.pod_name)
rescue
# no-op
end
def installation_phase
- helm_api.installation_status(app)
+ helm_api.installation_status(install_command.pod_name)
end
def installation_errors
- helm_api.installation_log(app)
+ helm_api.installation_log(install_command.pod_name)
end
end
end
diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb
index 4eba19a474e..8ceeec687cd 100644
--- a/app/services/clusters/applications/install_service.rb
+++ b/app/services/clusters/applications/install_service.rb
@@ -6,7 +6,7 @@ module Clusters
begin
app.make_installing!
- helm_api.install(app)
+ helm_api.install(install_command)
ClusterWaitForAppInstallationWorker.perform_in(
ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id)