Support the workhorse google cloud storage client
🌴 Context
In Add support for the workhorse google client (gitlab!96891 - merged), we added support in workhorse to have a native google cloud storage client setup through its configuration file.
In that request, we also updated the rails backend so that it can instruct to use that workhorse native client during direct uploads. Because the rails backend decides ultimately to use the workhorse GCS client or not, we can use a feature flag to slowly deploy this change and/or provide an additional safety net.
Using the workhorse google cloud storage client provides some benefits, see gitlab!96891 (merged).
In addition, it would allow bucket encryption. See https://docs.gitlab.com/ee/administration/object_storage.html#google-cloud-storage-gcs:
Bucket encryption with the Cloud Key Management Service (KMS) is not supported and will result in ETag mismatch errors.
🚛 Omnibus changes
We need the following:
- Detect that we have a consolidated object storage configuration in rails and that the config is using the
Google
provider. - Map such configuration to the workhorse configuration (the new settings introduced by the MR above).
- The Google provider can be configured in 3 different ways:
application_default
json_key_string
json_key_path
- We need to map those 3 possible settings into the workhorse configuration.