OpenStack Swift External Storage
Summary
I'm trying to setup an OpenStack Swift external storage for the file uploads. The current chart assumes the object store uses direct_upload which seems to be only supported by S3 and GCS. Using the same config as with omnibus (which is working) with direct_upload: false and background_upload: true doesn't work, the file looks to be uploaded successfully but isn't pushed to the external store.
Steps to reproduce
Create a rails secret with an external store which is OpenStack, change the configuration to direct_upload: false and background_upload: true and try to upload an avatar on the settings. The avatar won't be uploaded to the external store.
- I'm using !802 (merged) so I can use the external store only for the uploads, and this bit is working fine.
- The
direct_uploadandbackground_uploadsettings are not configurable in the current chart. I've modified _objectStorage.tpl in the meantime. If this is not configurable because it is not supported, the documentation should likely be update to say that only S3 compatible stores and GCS are supported?
Configuration used
In the helm values.yaml I have
globa:
appConfig:
uploads:
bucket: gitlab-uploads
connection:
secret: gitlab-rails-storage
key: connection
If I inspect the generated gitlab.yml in the pod I get the expected:
uploads:
enabled: true
object_store:
enabled: true
remote_directory: gitlab-uploads
direct_upload: false
background_upload: true
proxy_download: false
connection: {"provider":"OpenStack","openstack_username":"username","openstack_api_key":"api_key","openstack_temp_url_key":"temp_key","openstack_tenant":"tenant","openstack_auth_url":"https://auth.cloud.ovh.net/v2.0","openstack_region":"UK1"}
This wasn't working so to double check I tried with the Omnibus package and it works fine with the same config (i also checked the yaml)
gitlab_rails['uploads_object_store_enabled'] = true
gitlab_rails['uploads_object_store_direct_upload'] = false
gitlab_rails['uploads_object_store_background_upload'] = true
gitlab_rails['uploads_object_store_proxy_download'] = false
gitlab_rails['uploads_object_store_remote_directory'] = "gitlab-uploads"
gitlab_rails['uploads_object_store_connection'] = {
'provider' => 'OpenStack',
'openstack_username' => 'username',
'openstack_api_key' => 'api_key',
'openstack_temp_url_key' => 'temp_url',
'openstack_tenant' => 'tenant',
'openstack_auth_url' => 'https://auth.cloud.ovh.net/v2.0',
'openstack_region' => 'UK1'
}
Finally I saw that in the omnibus gitlab.yml the storage_path is defined, I tried to temporarily set it to /tmp/gitlab/public in _uploads.tpl, I can see the file uploaded /tmp/gitlab/public/uploads/-/system/user/avatar/2/avatar.png but it't not uploaded to the external store.
Current behavior
The file looks to be uploaded but is never pushed to the external store.
The configuration expects an external storage with direct_upload: true which looks to be only S3 and GCS while the doc specifies that fog storage can be used (which includes OpenStack Swift) but it doesn't upload the file.
Expected behavior
Expecting the external storage to work with the supported fog storage other than S3 and GCS, the current doc doesn't seem to say otherwise (https://docs.gitlab.com/charts/advanced/external-object-storage/).
Versions
- Chart: latest
- Platform:
- Self-hosted: bare metal with kubeadm
- Kubernetes: (
kubectl version)- Client: 1.14.1
- Server: 1.14.1
- Helm: (
helm version)- Client: 2.14.0
- Server: 2.14.0