kube-object-storage / lib-bucket-provisioner

Library for the dynamic provisioning of object store buckets to be used by object store providers.
Apache License 2.0
20 stars 22 forks source link

Custom labels #159

Closed copejon closed 5 years ago

copejon commented 5 years ago

This PR introduces a backwards compatible change to enable the setting of labels on resources managed by the provisioner. This is accomplished by adding aSetLabels(map[string]string) method to the Provisioner interface. The method statically assigns the map to the controller for access during sync operations.

The purpose of this change is to ease api resource management and provisioner development.

Also include some minor refactoring for readability.

fixes #133, #57 and replaces pr #140

Signed-off-by: Jon Cope jcope@redhat.com

jeffvance commented 5 years ago

Should update s3 and ceph provisioner docs to include the SetLabels call.

jeffvance commented 5 years ago

Quick testing shows this works as described. I changed the s3 provisioner to call SetLabels and I see the label on the OB, OBC, Secret and CM.

LGTM