From 7c87aebe5fc98331d7a54495910d5e3c5ee20f62 Mon Sep 17 00:00:00 2001 From: Nolan Brubaker Date: Tue, 31 Mar 2020 13:59:37 -0400 Subject: [PATCH] Only add CA cert to plugin config if it's defined Signed-off-by: Nolan Brubaker --- pkg/persistence/object_store.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/persistence/object_store.go b/pkg/persistence/object_store.go index 6cebbf80e..8ddf066a6 100644 --- a/pkg/persistence/object_store.go +++ b/pkg/persistence/object_store.go @@ -114,7 +114,10 @@ func NewObjectBackupStore(location *velerov1api.BackupStorageLocation, objectSto } location.Spec.Config["bucket"] = bucket location.Spec.Config["prefix"] = prefix - location.Spec.Config["caCert"] = string(location.Spec.ObjectStorage.CACert) + // Only include a CACert if it's specified in order to maintain compatibility with plugins that don't expect it. + if location.Spec.ObjectStorage.CACert != nil { + location.Spec.Config["caCert"] = string(location.Spec.ObjectStorage.CACert) + } } objectStore, err := objectStoreGetter.GetObjectStore(location.Spec.Provider)