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
21 stars 22 forks source link

OBC bucket name hierarchy/rules #86

Open jeffvance opened 5 years ago

jeffvance commented 5 years ago

Here are some rules agreed to by myself and @copejon:

  1. if obc bucketName != "" and obc generateBucketName != "" then the lib detects this as a validation error.
  2. if StorageClass's Parameters.bucketName is not defined or "" (greenfield), and obc bucketName == "" and generateBucketName == "" then lib validation error -- a bucket name must be specified.
  3. if StorageClass's Parameters.bucketName != "" (brownfield), and obc bucketName != "" and/or generateBucketName != "", then lib validation error -- obc cannot define bucket name in brownfield.

As a note, this hierarchy does not support a fully random (no prefix) bucket name, meaning the obc's bucketName == "" and the generatedBucketName == "". Minimally a 1-letter generateBucketName value must be supplied for random names.

copejon commented 5 years ago

If this is captured in docs, we should close it.

jeffvance commented 5 years ago

These rules are not documented in the design doc. Rule 1 is implemented by #88 I believe that rules 2 & 3 are not coded yet. If true a pr should be opened for these rules. And maybe a separate doc pr to document these rules.