Skip to content

Commit

Permalink
doc: add VolumeGroupSnapshot examples for RBD
Browse files Browse the repository at this point in the history
By labelling the PersistentVolumeClaim with `group: test`, the label
selector in the VolumeGroupSnapshot will create a snapshot of an RBD
group containing the single volume (or more if there are other volumes
in the same namespace with that label).

Once the VolumeGroupSnapshot is created, each volume in the group will
have a VolumeSnapshot that can be restored.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
  • Loading branch information
nixpanic committed Oct 11, 2024
1 parent 3802dd2 commit 6fb9f3f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/rbd/groupsnapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
kind: VolumeGroupSnapshot
metadata:
name: new-groupsnapshot-demo-2
spec:
source:
selector:
matchLabels:
# The PVCs will need to have this label for it to be
# included in the VolumeGroupSnapshot
group: test
volumeGroupSnapshotClassName: csi-rbdplugin-groupsnapclass
12 changes: 12 additions & 0 deletions examples/rbd/groupsnapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
kind: VolumeGroupSnapshotClass
metadata:
name: csi-rbdplugin-groupsnapclass
driver: openshift-storage.rbd.csi.ceph.com
parameters:
clusterID: openshift-storage
pool: ocs-storagecluster-cephblockpool
csi.storage.k8s.io/group-snapshotter-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/group-snapshotter-secret-namespace: openshift-storage
deletionPolicy: Delete
2 changes: 2 additions & 0 deletions examples/rbd/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rbd-pvc
labels:
group: test
spec:
accessModes:
- ReadWriteOnce
Expand Down

0 comments on commit 6fb9f3f

Please sign in to comment.