Relax constraints when consolidated object storage settings is enabled
What does this MR do and why?
Previously consolidated object storage settings were disabled if any
section-specific connection were specified. For example, in Omnibus if
gitlab_rails['artifacts_object_store_connection'] were specified
with some value, this would be a signal to use storage-specific
configurations.
However, this restriction became a problem when
!131819 (merged) promoted
ci_secure_files to be specified as a consolidated storage
type. Because gitlab_rails['ci_secure_files_object_store_connection']
may be specified, this would effectively disable object storage
for all the other types.
Let's relax this constraint by comparing the section-specific config with the consolidated object config. If the connection settings are the same, we can still use consolidated settings.
This makes it possible to "promote" ci_secure_files from
a storage-specific type to a consolidated storage supported type.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Set up your GDK with consolidated storage. For example:
object_store:
connection:
provider: AzureRM
azure_storage_account_name: YOUR-ACCOUNT-NAME
azure_storage_access_key: YOUR-ACCESS-KEY
consolidated_form: true
enabled: true
objects:
artifacts:
bucket: test1/artifacts
external_diffs:
bucket: test1/external_diffs
lfs:
bucket: test1/lfs
uploads:
bucket: test1/uploads
packages:
bucket: test1/packages
dependency_proxy:
bucket: test1/dependency-proxy
terraform_state:
bucket: test1/terraform
pages:
bucket: test1/pages
ci_secure_files:
bucket: test1/ci_secure_files
gitaly_backups:
bucket: test1/gitaly_backups
- In
gitlab/config/gitlab.ymlconfigure a storage-specific settings:
## CI Secure Files
ci_secure_files:
enabled: true
object_store:
enabled: true
connection:
<copy the connection settings from `gitlab.object_store`>
- Run
bin/rails console. - Check that
Settings.ci_secure_files.object_store['consolidated_settings']istrue(assuming !131819 (merged) is still present and not reverted). - Check that
Settings.ci_secure_files.object_storehas the right settings. - Check that
Settings.artifacts.object_storehas the right settings too.