From 4a5e70e00d26789096e7addd85ff80b4feea9ace Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Tue, 17 Mar 2020 11:14:41 -0600 Subject: [PATCH 1/2] allow plugins/ as a valid directory in the BSL bucket Signed-off-by: Steve Kriss --- pkg/persistence/object_store_layout.go | 1 + pkg/persistence/object_store_test.go | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pkg/persistence/object_store_layout.go b/pkg/persistence/object_store_layout.go index afea93a70..ebf75af19 100644 --- a/pkg/persistence/object_store_layout.go +++ b/pkg/persistence/object_store_layout.go @@ -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{ diff --git a/pkg/persistence/object_store_test.go b/pkg/persistence/object_store_test.go index fe573b2a0..61d628c09 100644 --- a/pkg/persistence/object_store_test.go +++ b/pkg/persistence/object_store_test.go @@ -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 { From 32ab45fa27a9c8c20c3423e0729c2275e95fe7ec Mon Sep 17 00:00:00 2001 From: Steve Kriss Date: Tue, 17 Mar 2020 11:21:56 -0600 Subject: [PATCH 2/2] changelog Signed-off-by: Steve Kriss --- changelogs/unreleased/2350-skriss | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/unreleased/2350-skriss diff --git a/changelogs/unreleased/2350-skriss b/changelogs/unreleased/2350-skriss new file mode 100644 index 000000000..236696a97 --- /dev/null +++ b/changelogs/unreleased/2350-skriss @@ -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/`.