summaryrefslogtreecommitdiff
path: root/lib/gitlab/kubernetes/helm/api.rb
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-03-01 23:46:02 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-03-01 23:46:02 +0000
commitc607008ee55e35465e04a938a341f2f24cb6761f (patch)
tree5fbabbeec70c9129b5db9b184d7620dbc35aaac2 /lib/gitlab/kubernetes/helm/api.rb
parent947a7f858765fdbad2f4084bed24994329d62337 (diff)
downloadgitlab-ce-c607008ee55e35465e04a938a341f2f24cb6761f.tar.gz
Extend Cluster Applications to install GitLab Runner to Kubernetes cluster
Diffstat (limited to 'lib/gitlab/kubernetes/helm/api.rb')
-rw-r--r--lib/gitlab/kubernetes/helm/api.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gitlab/kubernetes/helm/api.rb b/lib/gitlab/kubernetes/helm/api.rb
index 737081ddc5b..2edd34109ba 100644
--- a/lib/gitlab/kubernetes/helm/api.rb
+++ b/lib/gitlab/kubernetes/helm/api.rb
@@ -9,7 +9,8 @@ module Gitlab
def install(command)
@namespace.ensure_exists!
- @kubeclient.create_pod(pod_resource(command))
+ create_config_map(command) if command.config_map?
+ @kubeclient.create_pod(command.pod_resource)
end
##
@@ -33,8 +34,10 @@ module Gitlab
private
- def pod_resource(command)
- Gitlab::Kubernetes::Helm::Pod.new(command, @namespace.name, @kubeclient).generate
+ def create_config_map(command)
+ command.config_map_resource.tap do |config_map_resource|
+ @kubeclient.create_config_map(config_map_resource)
+ end
end
end
end