summaryrefslogtreecommitdiff
path: root/app/services/pod_logs/elasticsearch_service.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/services/pod_logs/elasticsearch_service.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/services/pod_logs/elasticsearch_service.rb')
-rw-r--r--app/services/pod_logs/elasticsearch_service.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/services/pod_logs/elasticsearch_service.rb b/app/services/pod_logs/elasticsearch_service.rb
index 58d1bfbf835..28ccace62e5 100644
--- a/app/services/pod_logs/elasticsearch_service.rb
+++ b/app/services/pod_logs/elasticsearch_service.rb
@@ -24,7 +24,7 @@ module PodLogs
end
def get_raw_pods(result)
- client = cluster&.application_elastic_stack&.elasticsearch_client
+ client = cluster&.elasticsearch_client
return error(_('Unable to connect to Elasticsearch')) unless client
result[:raw_pods] = ::Gitlab::Elasticsearch::Logs::Pods.new(client).pods(namespace)
@@ -66,11 +66,9 @@ module PodLogs
end
def pod_logs(result)
- client = cluster&.application_elastic_stack&.elasticsearch_client
+ client = cluster&.elasticsearch_client
return error(_('Unable to connect to Elasticsearch')) unless client
- chart_above_v2 = cluster.application_elastic_stack.chart_above_v2?
-
response = ::Gitlab::Elasticsearch::Logs::Lines.new(client).pod_logs(
namespace,
pod_name: result[:pod_name],
@@ -79,7 +77,7 @@ module PodLogs
start_time: result[:start_time],
end_time: result[:end_time],
cursor: result[:cursor],
- chart_above_v2: chart_above_v2
+ chart_above_v2: cluster.elastic_stack_adapter.chart_above_v2?
)
result.merge!(response)