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>2023-10-10 06:11:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-10 06:11:57 +0300
commit9cf88c2d9632fe649bd3523fd490d6f5523fb8d0 (patch)
tree75f4b1eb1f93e5a8e5fd383323176fe1fa8aca15 /config/object_store_settings.rb
parentcf66f24775fed5c73cda783abf25c1281e81fedf (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/object_store_settings.rb')
-rw-r--r--config/object_store_settings.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/object_store_settings.rb b/config/object_store_settings.rb
index 283cd952c04..484f89de48f 100644
--- a/config/object_store_settings.rb
+++ b/config/object_store_settings.rb
@@ -50,6 +50,20 @@ class ObjectStoreSettings
[bucket, prefix]
end
+ def self.enabled_endpoint_uris
+ SUPPORTED_TYPES.filter_map do |type|
+ section_setting = Gitlab.config.try(type)
+
+ next unless section_setting && section_setting['enabled']
+
+ object_store_setting = section_setting['object_store']
+
+ next unless object_store_setting && object_store_setting['enabled']
+
+ URI(object_store_setting.dig('connection', 'endpoint'))
+ end.uniq
+ end
+
def initialize(settings)
@settings = settings
end