Skip to content

Commit

Permalink
Support the caCert object storage entryA
Browse files Browse the repository at this point in the history
Velero PR #2353 added the caCert into the object storage by default. The
GCP plugin needs to honor this standard.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
  • Loading branch information
nrb committed Mar 31, 2020
1 parent 9b952ca commit 48c8e29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion velero-plugin-for-gcp/object_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const (
credentialsEnvVar = "GOOGLE_APPLICATION_CREDENTIALS"
kmsKeyNameConfigKey = "kmsKeyName"
serviceAccountConfig = "serviceAccount"
caCert = "caCert"
)

// bucketWriter wraps the GCP SDK functions for accessing object store so they can be faked for testing.
Expand Down Expand Up @@ -76,7 +77,7 @@ func newObjectStore(logger logrus.FieldLogger) *ObjectStore {
}

func (o *ObjectStore) Init(config map[string]string) error {
if err := veleroplugin.ValidateObjectStoreConfigKeys(config, kmsKeyNameConfigKey, serviceAccountConfig); err != nil {
if err := veleroplugin.ValidateObjectStoreConfigKeys(config, kmsKeyNameConfigKey, serviceAccountConfig, caCert); err != nil {
return err
}
// Find default token source to extract the GoogleAccessID
Expand Down

0 comments on commit 48c8e29

Please sign in to comment.