mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-07 05:46:37 +00:00
Merge pull request #2350 from skriss/allow-plugins-dir
allow plugins/ as a valid directory in the BSL bucket
This commit is contained in:
1
changelogs/unreleased/2350-skriss
Normal file
1
changelogs/unreleased/2350-skriss
Normal file
@@ -0,0 +1 @@
|
||||
Allow `plugins/` as a valid top-level directory within backup storage locations. This directory is a place for plugin authors to store arbitrary data as needed. It is recommended to create an additional subdirectory under `plugins/` specifically for your plugin, e.g. `plugins/my-plugin-data/`.
|
||||
@@ -39,6 +39,7 @@ func NewObjectStoreLayout(prefix string) *ObjectStoreLayout {
|
||||
"restores": path.Join(prefix, "restores") + "/",
|
||||
"restic": path.Join(prefix, "restic") + "/",
|
||||
"metadata": path.Join(prefix, "metadata") + "/",
|
||||
"plugins": path.Join(prefix, "plugins") + "/",
|
||||
}
|
||||
|
||||
return &ObjectStoreLayout{
|
||||
|
||||
@@ -138,6 +138,13 @@ func TestIsValid(t *testing.T) {
|
||||
},
|
||||
expectErr: false,
|
||||
},
|
||||
{
|
||||
name: "backup store with plugins directory is valid",
|
||||
storageData: map[string][]byte{
|
||||
"plugins/vsphere/foo": {},
|
||||
},
|
||||
expectErr: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
|
||||
Reference in New Issue
Block a user