Commit dde4fad2 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix-cluster-integration-elasticsearch-http-adapter' into 'master'

Fix cluster integration HTTP adapter

See merge request gitlab-org/gitlab!78737
parents 07757ca0 332652b9
...@@ -15,7 +15,7 @@ module Clusters ...@@ -15,7 +15,7 @@ module Clusters
proxy_url = kube_client.proxy_url('service', service_name, ELASTICSEARCH_PORT, ELASTICSEARCH_NAMESPACE) proxy_url = kube_client.proxy_url('service', service_name, ELASTICSEARCH_PORT, ELASTICSEARCH_NAMESPACE)
Elasticsearch::Client.new(url: proxy_url) do |faraday| Elasticsearch::Client.new(url: proxy_url, adapter: :net_http) do |faraday|
# ensures headers containing auth data are appended to original client options # ensures headers containing auth data are appended to original client options
faraday.headers.merge!(kube_client.headers) faraday.headers.merge!(kube_client.headers)
# ensure TLS certs are properly verified # ensure TLS certs are properly verified
......
...@@ -47,7 +47,7 @@ RSpec.shared_examples 'cluster-based #elasticsearch_client' do |factory| ...@@ -47,7 +47,7 @@ RSpec.shared_examples 'cluster-based #elasticsearch_client' do |factory|
it 'copies proxy_url, options and headers from kube client to elasticsearch_client' do it 'copies proxy_url, options and headers from kube client to elasticsearch_client' do
expect(Elasticsearch::Client) expect(Elasticsearch::Client)
.to(receive(:new)) .to(receive(:new))
.with(url: a_valid_url) .with(url: a_valid_url, adapter: :net_http)
.and_call_original .and_call_original
client = subject.elasticsearch_client client = subject.elasticsearch_client
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment