diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-25 11:00:54 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-01-25 11:00:54 +0000 |
commit | 53b8e6e3890efdb8db132559d35ff231f2aaf71d (patch) | |
tree | 470a18e90816bea353db0fa6c013cbdc3cd115d3 /config | |
parent | 552f80328351b11ce9845448110f2db3afc09a2b (diff) | |
parent | f234aef9943ec7ccd3e30e55d6cd0acd114e6c29 (diff) | |
download | gitlab-ce-53b8e6e3890efdb8db132559d35ff231f2aaf71d.tar.gz |
Merge branch '54250-upstream-kubeclient-redirect-patch' into 'master'
Use http_max_redirects opt to replace monkeypatch
Closes #54250
See merge request gitlab-org/gitlab-ce!24284
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/kubeclient.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/config/initializers/kubeclient.rb b/config/initializers/kubeclient.rb deleted file mode 100644 index f8fe1156aaa..00000000000 --- a/config/initializers/kubeclient.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Kubeclient::Client - # Monkey patch to set `max_redirects: 0`, so that kubeclient - # does not follow redirects and expose internal services. - # See https://gitlab.com/gitlab-org/gitlab-ce/issues/53158 - def create_rest_client(path = nil) - path ||= @api_endpoint.path - options = { - ssl_ca_file: @ssl_options[:ca_file], - ssl_cert_store: @ssl_options[:cert_store], - verify_ssl: @ssl_options[:verify_ssl], - ssl_client_cert: @ssl_options[:client_cert], - ssl_client_key: @ssl_options[:client_key], - proxy: @http_proxy_uri, - user: @auth_options[:username], - password: @auth_options[:password], - open_timeout: @timeouts[:open], - read_timeout: @timeouts[:read], - max_redirects: 0 - } - RestClient::Resource.new(@api_endpoint.merge(path).to_s, options) - end -end |