Commit ca52b32b authored by Thong Kuah's avatar Thong Kuah

Remove monkeypatch as now present in upstream

See
https://github.com/abonas/kubeclient/blob/v4.0.0/lib/kubeclient/common.rb#L395
parent 685218c4
class Kubeclient::Client
# We need to monkey patch this method until
# https://github.com/abonas/kubeclient/pull/323 is merged
def proxy_url(kind, name, port, namespace = '')
discover unless @discovered
entity_name_plural =
if %w[services pods nodes].include?(kind.to_s)
kind.to_s
else
@entities[kind.to_s].resource_name
end
ns_prefix = build_namespace_prefix(namespace)
rest_client["#{ns_prefix}#{entity_name_plural}/#{name}:#{port}/proxy"].url
end
# 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
......
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