mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-03 11:45:20 +00:00
In preparation for modifying the instantiation of `BackupStores` to be able to load credentials, change the function `NewObjectBackupStore` to be an interface that is passed in to all controllers. Previously, the function to get a new backup store was configurable but for many controllers was fixed to use `NewObjectBackupStore`. This change introduces an interface for getting the backup store and wraps the functionality from `NewObjectBackupStore` in a type which implements this interface. This will allow more flexibility when introducing credentials for a specific backup store as it will allow us to create a new `ObjectBackupStoreGetter` type which can be configured to add credentials config when creating the ObjectBackupStore without needing to change the API used by the controllers. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>