Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/clusters/integrations/create_service.rb')
-rw-r--r--app/services/clusters/integrations/create_service.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/services/clusters/integrations/create_service.rb b/app/services/clusters/integrations/create_service.rb
index f9e9dd3e457..142f731a7d3 100644
--- a/app/services/clusters/integrations/create_service.rb
+++ b/app/services/clusters/integrations/create_service.rb
@@ -27,12 +27,15 @@ module Clusters
private
def integration
- case params[:application_type]
- when 'prometheus'
- cluster.find_or_build_integration_prometheus
- else
- raise ArgumentError, "invalid application_type: #{params[:application_type]}"
- end
+ @integration ||= \
+ case params[:application_type]
+ when 'prometheus'
+ cluster.find_or_build_integration_prometheus
+ when 'elastic_stack'
+ cluster.find_or_build_integration_elastic_stack
+ else
+ raise ArgumentError, "invalid application_type: #{params[:application_type]}"
+ end
end
def authorized?