Skip to content

Commit

Permalink
docs: explain about region in storage class for OBC
Browse files Browse the repository at this point in the history
The default value for region in RGW is us-east-1, if users want to use
other regions then they need to create zone/zonegroup accordingly before
defining it in storage class.

Fixes: #9486
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
  • Loading branch information
thotz committed Feb 23, 2022
1 parent 238178d commit cd70ca5
Showing 1 changed file with 77 additions and 3 deletions.
80 changes: 77 additions & 3 deletions Documentation/ceph-object-bucket-claim.md
Expand Up @@ -102,18 +102,92 @@ metadata:
labels:
aws-s3/object [1]
provisioner: rook-ceph.ceph.rook.io/bucket [2]
parameters: [3]
parameters:
objectStoreName: my-store
objectStoreNamespace: rook-ceph
region: us-west-1
region: us-west-1 [3]
bucketName: ceph-bucket [4]
reclaimPolicy: Delete [5]
```
1. `label`(optional) here associates this `StorageClass` to a specific provisioner.
1. `provisioner` responsible for handling `OBCs` referencing this `StorageClass`.
1. **all** `parameter` required.
1. `region`(optional) defines the region in which the bucket should be created. For RGW, this maps to [zonegroup](https://docs.ceph.com/en/latest/radosgw/multisite/#zone-groups) of the server. If user does not define `region`, Rook will fill this value accordingly. For examples please check at the end of the doc.
1. `bucketName` is required for access to existing buckets but is omitted when provisioning new buckets.
Unlike greenfield provisioning, the brownfield bucket name appears in the `StorageClass`, not the `OBC`.
1. rook-ceph provisioner decides how to treat the `reclaimPolicy` when an `OBC` is deleted for the bucket. See explanation as [specified in Kubernetes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#retain)
+ _Delete_ = physically delete the bucket.
+ _Retain_ = do not physically delete the bucket.


##### Storage Class for simple local object store
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-delete-bucket
provisioner: rook-ceph.ceph.rook.io/bucket
reclaimPolicy: Delete
parameters:
objectStoreName: my-store
objectStoreNamespace: rook-ceph
```

##### CRDs for Storage Class, if region defined
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-delete-bucket
provisioner: rook-ceph.ceph.rook.io/bucket
reclaimPolicy: Delete
parameters:
objectStoreName: my-store
objectStoreNamespace: rook-ceph
region: us-west-1
---
apiVersion: ceph.rook.io/v1
kind: CephObjectRealm
metadata:
name: us-west-realm
namespace: rook-ceph
---
apiVersion: ceph.rook.io/v1
kind: CephObjectZoneGroup
metadata:
name: us-west-1
namespace: rook-ceph
spec:
realm: us-west-realm
---
apiVersion: ceph.rook.io/v1
kind: CephObjectZone
metadata:
name: us-west-1a
namespace: rook-ceph
spec:
zoneGroup: us-west-1
metadataPool:
failureDomain: host
replicated:
size: 1
requireSafeReplicaSize: false
dataPool:
failureDomain: host
replicated:
size: 1
requireSafeReplicaSize: false
parameters:
compression_mode: none
---
apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
name: my-store
namespace: rook-ceph
spec:
gateway:
port: 80
instances: 1
zone:
name: us-west-1a
```

0 comments on commit cd70ca5

Please sign in to comment.