Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-09 15:08:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-09 15:08:54 +0300
commit1804227b4fb012858930b66419b026a5bf8b8f7d (patch)
tree60df6784d16c2a05d5c3110d8651cfed86a96034 /lib/gitlab/kubernetes
parent204311cdb5049d193070ce04bcc0d4f8bcc0b6f8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/kubernetes')
-rw-r--r--lib/gitlab/kubernetes/kube_client.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/kubernetes/kube_client.rb b/lib/gitlab/kubernetes/kube_client.rb
index 7d2abcdb0a3..7c5525b982c 100644
--- a/lib/gitlab/kubernetes/kube_client.rb
+++ b/lib/gitlab/kubernetes/kube_client.rb
@@ -90,12 +90,21 @@ module Gitlab
attr_reader :api_prefix, :kubeclient_options
+ DEFAULT_KUBECLIENT_OPTIONS = {
+ timeouts: {
+ open: 10,
+ read: 30
+ }
+ }.freeze
+
# We disable redirects through 'http_max_redirects: 0',
# so that KubeClient does not follow redirects and
# expose internal services.
def initialize(api_prefix, **kubeclient_options)
@api_prefix = api_prefix
- @kubeclient_options = kubeclient_options.merge(http_max_redirects: 0)
+ @kubeclient_options = DEFAULT_KUBECLIENT_OPTIONS
+ .deep_merge(kubeclient_options)
+ .merge(http_max_redirects: 0)
validate_url!
end