diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/models/clusters/applications/elastic_stack.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/models/clusters/applications/elastic_stack.rb')
-rw-r--r-- | app/models/clusters/applications/elastic_stack.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/models/clusters/applications/elastic_stack.rb b/app/models/clusters/applications/elastic_stack.rb index 0d029aabc3b..58ac0c1f188 100644 --- a/app/models/clusters/applications/elastic_stack.rb +++ b/app/models/clusters/applications/elastic_stack.rb @@ -34,7 +34,8 @@ module Clusters repository: repository, files: files, preinstall: migrate_to_3_script, - postinstall: post_install_script + postinstall: post_install_script, + local_tiller_enabled: cluster.local_tiller_enabled? ) end @@ -43,7 +44,8 @@ module Clusters name: 'elastic-stack', rbac: cluster.platform_kubernetes_rbac?, files: files, - postdelete: post_delete_script + postdelete: post_delete_script, + local_tiller_enabled: cluster.local_tiller_enabled? ) end @@ -51,7 +53,7 @@ module Clusters super.merge('wait-for-elasticsearch.sh': File.read("#{Rails.root}/vendor/elastic_stack/wait-for-elasticsearch.sh")) end - def elasticsearch_client + def elasticsearch_client(timeout: nil) strong_memoize(:elasticsearch_client) do next unless kube_client @@ -63,6 +65,7 @@ module Clusters # ensure TLS certs are properly verified faraday.ssl[:verify] = kube_client.ssl_options[:verify_ssl] faraday.ssl[:cert_store] = kube_client.ssl_options[:cert_store] + faraday.options.timeout = timeout unless timeout.nil? end rescue Kubeclient::HttpError => error @@ -118,7 +121,8 @@ module Clusters Gitlab::Kubernetes::Helm::DeleteCommand.new( name: 'elastic-stack', rbac: cluster.platform_kubernetes_rbac?, - files: files + files: files, + local_tiller_enabled: cluster.local_tiller_enabled? ).delete_command, Gitlab::Kubernetes::KubectlCmd.delete("pvc", "--selector", "release=elastic-stack", "--namespace", Gitlab::Kubernetes::Helm::NAMESPACE) ] |