Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the caCert object storage entry #23

Closed
wants to merge 1 commit into from

Conversation

nrb
Copy link
Contributor

@nrb nrb commented Mar 31, 2020

Velero PR #2353 added the caCert into the object storage by default. The
GCP plugin needs to honor this standard.

Fixes #22

Signed-off-by: Nolan Brubaker brubakern@vmware.com

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>
Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -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 {
Copy link
Member

@skriss skriss Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the plugin framework function has been updated to always allow this key - see https://github.com/vmware-tanzu/velero/blob/master/pkg/plugin/framework/validation.go#L30. So we shouldn't have to add the key here, we can just update the velero dependency (for better or worse, this repo still uses dep and the master branch of velero so should just need a dep ensure -update github.com/vmware-tanzu/velero).

I do think we should probably change https://github.com/vmware-tanzu/velero/blob/master/pkg/persistence/object_store.go#L115-L117 to only add these items to the Config map if they're non-empty since we'll likely hit this issue for community plugins when we release the ca cert change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks. I saw this when I was testing against a branch based off master, so the GCP plugin hadn't been updated yet. I didn't catch the plugin framework part of the change, but I agree that's a better place to put it than updating each plugin individually.

I'll close out this PR.

@nrb
Copy link
Contributor Author

nrb commented Mar 31, 2020

This change is handled in https://github.com/vmware-tanzu/velero/blob/master/pkg/plugin/framework/validation.go#L30 more generically, which is a better solution than each plugin handling it themselves. Will open a separate PR to update the Velero dependency when a new version is out.

@nrb nrb closed this Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants