]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/s3: CreateBucket extension for layout type and shard count
authorCasey Bodley <cbodley@redhat.com>
Wed, 8 Jan 2025 19:52:03 +0000 (14:52 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 25 Feb 2025 16:15:57 +0000 (11:15 -0500)
commit567f6086ce8365bdd9779e0f356cde501c6ccbc6
tree7c6b0288aab966a9f5f3cf1ed531c08586088500
parentcd867bc19d9dae9aa20d60e382854c3b1ba62f6e
rgw/s3: CreateBucket extension for layout type and shard count

extend s3's CreateBucketConfiguration [1] with a custom BucketIndex element
that can override rgw's default bucket index type and shard count

to create an indexless bucket:
  <CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <BucketIndex>
      <Type>Indexless</Type>
    </BucketIndex>
  </CreateBucketConfiguration>

to create a normal pre-sharded bucket:
  <CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <BucketIndex>
      <Type>Normal</Type>
      <NumShards>1023</NumShards>
    </BucketIndex>
  </CreateBucketConfiguration>

[1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html#API_CreateBucket_RequestSyntax

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_s3.cc