summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-27 11:18:36 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-27 11:18:36 +0000
commit921d6b1a13b5ec59217ab714b4daa6800500d95f (patch)
tree47ed920e09bc88f959be5f8169ead813e5ccadc6
parent3a3a767c4a4fa4ca7a2858d5c5940e557661187a (diff)
parentca52b32b4632bcd8d4ae10c082abf82ff2459b0d (diff)
downloadgitlab-ce-921d6b1a13b5ec59217ab714b4daa6800500d95f.tar.gz
Merge branch 'upgrade_kubeclient_400' into 'master'
Upgrade kubeclient to 4.0.0 See merge request gitlab-org/gitlab-ce!23261
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock12
-rw-r--r--Gemfile.rails4.lock12
-rw-r--r--changelogs/unreleased/upgrade_kubeclient_400.yml5
-rw-r--r--config/initializers/kubeclient.rb15
5 files changed, 18 insertions, 28 deletions
diff --git a/Gemfile b/Gemfile
index 1e20c8e7cd7..524d9d6a1de 100644
--- a/Gemfile
+++ b/Gemfile
@@ -235,7 +235,7 @@ gem 'asana', '~> 0.8.1'
gem 'ruby-fogbugz', '~> 0.2.1'
# Kubernetes integration
-gem 'kubeclient', '~> 3.1.0'
+gem 'kubeclient', '~> 4.0.0'
# Sanitize user input
gem 'sanitize', '~> 4.6'
diff --git a/Gemfile.lock b/Gemfile.lock
index fdcac3b3952..f622c6292b2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -367,14 +367,14 @@ GEM
html2text (0.2.0)
nokogiri (~> 1.6)
htmlentities (4.3.4)
- http (2.2.2)
+ http (3.3.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
- http-form_data (~> 1.0.1)
+ http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
- http-form_data (1.0.3)
+ http-form_data (2.1.1)
http_parser.rb (0.6.0)
httparty (0.13.7)
json (~> 1.8)
@@ -418,8 +418,8 @@ GEM
kgio (2.10.0)
knapsack (1.17.0)
rake
- kubeclient (3.1.0)
- http (~> 2.2.2)
+ kubeclient (4.0.0)
+ http (~> 3.0)
recursive-open-struct (~> 1.0, >= 1.0.4)
rest-client (~> 2.0)
launchy (2.4.3)
@@ -1042,7 +1042,7 @@ DEPENDENCIES
jwt (~> 1.5.6)
kaminari (~> 1.0)
knapsack (~> 1.17)
- kubeclient (~> 3.1.0)
+ kubeclient (~> 4.0.0)
letter_opener_web (~> 1.3.0)
license_finder (~> 5.4)
licensee (~> 8.9)
diff --git a/Gemfile.rails4.lock b/Gemfile.rails4.lock
index 57f126ddfee..2542e085815 100644
--- a/Gemfile.rails4.lock
+++ b/Gemfile.rails4.lock
@@ -364,14 +364,14 @@ GEM
html2text (0.2.0)
nokogiri (~> 1.6)
htmlentities (4.3.4)
- http (2.2.2)
+ http (3.3.0)
addressable (~> 2.3)
http-cookie (~> 1.0)
- http-form_data (~> 1.0.1)
+ http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
- http-form_data (1.0.3)
+ http-form_data (2.1.1)
http_parser.rb (0.6.0)
httparty (0.13.7)
json (~> 1.8)
@@ -415,8 +415,8 @@ GEM
kgio (2.10.0)
knapsack (1.17.0)
rake
- kubeclient (3.1.0)
- http (~> 2.2.2)
+ kubeclient (4.0.0)
+ http (~> 3.0)
recursive-open-struct (~> 1.0, >= 1.0.4)
rest-client (~> 2.0)
launchy (2.4.3)
@@ -1033,7 +1033,7 @@ DEPENDENCIES
jwt (~> 1.5.6)
kaminari (~> 1.0)
knapsack (~> 1.17)
- kubeclient (~> 3.1.0)
+ kubeclient (~> 4.0.0)
letter_opener_web (~> 1.3.0)
license_finder (~> 5.4)
licensee (~> 8.9)
diff --git a/changelogs/unreleased/upgrade_kubeclient_400.yml b/changelogs/unreleased/upgrade_kubeclient_400.yml
new file mode 100644
index 00000000000..edb38710e6a
--- /dev/null
+++ b/changelogs/unreleased/upgrade_kubeclient_400.yml
@@ -0,0 +1,5 @@
+---
+title: Upgrade kubeclient to 4.0.0
+merge_request: 23261
+author: Praveen Arimbrathodiyil @pravi
+type: other
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