Skip to content

Commit

Permalink
docs: document how to have StorageClass consume Rados Namespace
Browse files Browse the repository at this point in the history
closes: #13214

Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Signed-off-by: Michael Adam <obnox@samba.org>
  • Loading branch information
3 people committed May 18, 2024
1 parent eecaa25 commit 8e7ac95
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,35 @@ If any setting is unspecified, a suitable default will be used automatically.
### Spec

- `blockPoolName`: The metadata name of the CephBlockPool CR where the rados namespace will be created.

## Creating a Storage Class

Once the RADOS namespace is created, an RBD-based StorageClass can be created to
create PVs in this RADOS namespace. For this purpose, the `clusterID` value from the
CephBlockPoolRadosNamespace status needs to be put into the `clusterID` field of the StorageClass
spec.

Extract the clusterID from the CephBlockPoolRadosNamespace CR:

```console
$ kubectl -n rook-ceph get cephblockpoolradosnamespace/namespace-a -o jsonpath='{.status.info.clusterID}'
80fc4f4bacc064be641633e6ed25ba7e
```

In this example, replace `namespace-a` by the actual name of the radosnamespace
created before.
Now set the `clusterID` retrieved from the previous step into the `clusterID` of the storage class.

Example:

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block-rados-ns
provisioner: rook-ceph.rbd.csi.ceph.com # csi-provisioner-name
parameters:
clusterID: 80fc4f4bacc064be641633e6ed25ba7e
pool: replicapool
...
```

0 comments on commit 8e7ac95

Please sign in to comment.