summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 17:35:55 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 17:35:55 +0100
commitc42786021caed7e10ca3b001be1ae08fc092417a (patch)
tree499e3fb7da0bf27727c5c45cdad411c68b9bb270 /app
parent18760259182050ee92e8e10dc5d46e56ca7f601f (diff)
parent02878cd958557128cd9c22b27bd2fb97a843266b (diff)
downloadgitlab-ce-c42786021caed7e10ca3b001be1ae08fc092417a.tar.gz
Merge remote-tracking branch 'origin/38464-k8s-apps' into add-ingress-to-cluster-applications
Diffstat (limited to 'app')
-rw-r--r--app/models/clusters/applications/helm.rb4
-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
4 files changed, 12 insertions, 4 deletions
diff --git a/app/models/clusters/applications/helm.rb b/app/models/clusters/applications/helm.rb
index 7ea84841118..c7949d11ef8 100644
--- a/app/models/clusters/applications/helm.rb
+++ b/app/models/clusters/applications/helm.rb
@@ -26,6 +26,10 @@ module Clusters
def name
self.class.application_name
end
+
+ def install_command
+ Gitlab::Kubernetes::Helm::InstallCommand.new(name, true)
+ end
end
end
end
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)