compliantkubernetes-apps icon indicating copy to clipboard operation
compliantkubernetes-apps copied to clipboard

Add support for "swift" type for rclone-sync

Open Ajarmar opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

When using type: s3 for rclone-sync, rclone fails to sync image data for harbor in Cleura environments. Using swift fixes this issue.

Describe the solution you'd like

Add a new case for .Values.config.source.type "swift" in the rclone.conf file, both for source and destination. Other than type, the following config variables are needed for the swift type:

user = {{ .Values.something }}
key = {{ .Values.something }}
auth = {{ .Values.something }}
domain = {{ .Values.something }}
tenant = {{ .Values.something }}
tenant_domain = {{ .Values.something }}
region = {{ .Values.something }}

This config file gets its values from this values file, which will need to have some new variables added.

Describe alternatives you've considered

Additional context

Following are descriptions of the config variables:

  • user - Corresponds to OS_USERNAME. In the apps config, this value is currently available for the source bucket in secrets.yaml as harbor.persistence.swift.username.
  • key - Corresponds to OS_PASSWORD. In the apps config, this value is currently available for the source bucket in secrets.yaml as harbor.persistence.swift.password.
  • auth- Corresponds to OS_AUTH_URL, with /v3 appended at the end (it will not work without this addition). For example, for the kna1 region on Cleura, this would be https://kna1.citycloud.com:5000/v3. In the apps config, this value is currently available for the source bucket in sc-config.yaml as harbor.persistence.swift.authURL (without the /v3).
  • domain - Corresponds to OS_USER_DOMAIN_NAME. In the apps config, this value is currently available for the source bucket in sc-config.yaml as harbor.persistence.swift.userDomainName.
  • tenant - Corresponds to OS_TENANT_NAME. In the apps config, this value is currently available for the source bucket in sc-config.yaml as harbor.persistence.swift.tenantName.
  • tenant_domain - Corresponds to OS_PROJECT_DOMAIN_NAME. In the apps config, this value is currently available for the source bucket in sc-config.yaml as harbor.persistence.swift.projectDomainName.
  • region - Corresponds to OS_REGION_NAME. In the apps config, this value is currently available for the source bucket in sc-config.yaml as harbor.persistence.swift.regionName.

Since the currently available values in the apps config all refer to harbor, it may be preferable to rename these variables to something else since it will no longer be used only for harbor. Additionally, note that all of them are the values for the source, not the destination - in some cases there may be overlap (for example the username and password may be the same for both source and destination), but for others this is unlikely (e.g. region should always differ). New variables should probably be added for all of them (i.e. don't assume any overlap).

A restriction that requires the global.ck8sCloudProvider to be citycloud may be relevant, since that is our only supported provider that uses swift.

Definition of done:

  • It is possible to use objectStorage.sync.type: swift and get a working rclone setup.

Ajarmar avatar Nov 17 '22 15:11 Ajarmar

I would also like to see the possibility to use type: ceph

robinAwallace avatar Nov 21 '22 10:11 robinAwallace