compliantkubernetes-apps
compliantkubernetes-apps copied to clipboard
Add support for "swift" type for rclone-sync
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 toOS_USERNAME
. In the apps config, this value is currently available for the source bucket insecrets.yaml
asharbor.persistence.swift.username
. -
key
- Corresponds toOS_PASSWORD
. In the apps config, this value is currently available for the source bucket insecrets.yaml
asharbor.persistence.swift.password
. -
auth
- Corresponds toOS_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 behttps://kna1.citycloud.com:5000/v3
. In the apps config, this value is currently available for the source bucket insc-config.yaml
asharbor.persistence.swift.authURL
(without the/v3
). -
domain
- Corresponds toOS_USER_DOMAIN_NAME
. In the apps config, this value is currently available for the source bucket insc-config.yaml
asharbor.persistence.swift.userDomainName
. -
tenant
- Corresponds toOS_TENANT_NAME
. In the apps config, this value is currently available for the source bucket insc-config.yaml
asharbor.persistence.swift.tenantName
. -
tenant_domain
- Corresponds toOS_PROJECT_DOMAIN_NAME
. In the apps config, this value is currently available for the source bucket insc-config.yaml
asharbor.persistence.swift.projectDomainName
. -
region
- Corresponds toOS_REGION_NAME
. In the apps config, this value is currently available for the source bucket insc-config.yaml
asharbor.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.
I would also like to see the possibility to use type: ceph