Commit 332652b9 authored by Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason Committed by Sean McGivern

Fix cluster integration HTTP adapter

Somehow, https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76879
caused typhoeus to become the default adapter for all elasticsearch
clients, causing problems for the cluster integration, which apparently
has Net::HTTP specific needs.

See https://gitlab.com/gitlab-org/gitlab/-/issues/350519

Changelog: fixed
parent 7e5d436c
......@@ -15,7 +15,7 @@ module Clusters
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
faraday.headers.merge!(kube_client.headers)
# ensure TLS certs are properly verified
......
......@@ -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
expect(Elasticsearch::Client)
.to(receive(:new))
.with(url: a_valid_url)
.with(url: a_valid_url, adapter: :net_http)
.and_call_original
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