-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectStorage Prefix specified in BackupStorageLocation is ignored #258
Comments
Supporting the registry here was one of the reasons we added the prefix in the first place -- the registry can't be in the same prefix as the velero backup, or velero will complain about the docker dir. To avoid the issue you're hitting, we'd probably need to add a separate prefix for the registry location outside of the BSL config. |
You mean adding the prefix to
Ah, that's interesting. So if prefix is UPDATE: Indeed, I found the relevant code snippet here: https://github.com/vmware-tanzu/velero/blob/6c2b66b480f1f58e08f62c8a0e8ae820a9cd02c6/pkg/persistence/object_store.go#L203 But plugins are allowed to (supposed to?) write arbitrary data to the
|
Sure. But it would be a breaking change. or require some migration effort. |
Yes, exactly.
Yes -- this is actually why I implemented the prefix feature upstream in the BSL in the first place.
|
And actually, any change here is potentially a breaking change, even my earlier suggestion for a registry-specific prefix. One possibility to fix would be to have the registry creation code configure the new location under plugins but if an existing registry exists at the top level, velero could copy the full set of registry files from top level to plugins if there are no files yet under plugins. |
Very true. I think this requirement / limitation should at least be very clearly documented. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
Hello,
Velero's BackupStorageLocation (
.spec.objectStorage.prefix
) as well as OADP's DataProtectionApplication (.spec.backupLocations[].velero.objectStorage.prefix
) allow setting a (optional) prefix for files uploaded into the S3 bucket:https://velero.io/docs/v1.13/api-types/backupstoragelocation/
Our
BackupStorageLocation
is configured with such a prefix, but the plugin currently ignores this. This leads to conflicts in the S3 bucket sinceImageStream
data is always uploaded todocker/registry/v2/...
(when using the PluginRegistry).This appears to be the problematic part of the code:
openshift-velero-plugin/velero-plugins/imagestream/registry.go
Line 133 in 95ab2b0
An additional environment variable
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=${BSL.spec.objectStorage.prefix}
should be added to address this (see example in the (registry configuration documentation](https://distribution.github.io/distribution/about/configuration/))The text was updated successfully, but these errors were encountered: