summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-27 21:05:34 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-27 21:05:34 +1300
commitca52b32b4632bcd8d4ae10c082abf82ff2459b0d (patch)
tree65aa8682a8dbc02bbe282620b0f4695cdf5668e8
parent685218c4230f3eb75278b16f00544b7adaf5e596 (diff)
downloadgitlab-ce-ca52b32b4632bcd8d4ae10c082abf82ff2459b0d.tar.gz
Remove monkeypatch as now present in upstream
See https://github.com/abonas/kubeclient/blob/v4.0.0/lib/kubeclient/common.rb#L395
-rw-r--r--config/initializers/kubeclient.rb15
1 files changed, 0 insertions, 15 deletions
diff --git a/config/initializers/kubeclient.rb b/config/initializers/kubeclient.rb
index 2d9f439fdc0..f8fe1156aaa 100644
--- a/config/initializers/kubeclient.rb
+++ b/config/initializers/kubeclient.rb
@@ -1,19 +1,4 @@
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