mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
doc: add VolumeGroupSnapshot examples for RBD
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>
This commit is contained in:
parent
6df173dbf3
commit
395b062d65
13
examples/rbd/groupsnapshot.yaml
Normal file
13
examples/rbd/groupsnapshot.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
|
||||
kind: VolumeGroupSnapshot
|
||||
metadata:
|
||||
name: rbd-groupsnapshot
|
||||
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
|
19
examples/rbd/groupsnapshotclass.yaml
Normal file
19
examples/rbd/groupsnapshotclass.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
|
||||
kind: VolumeGroupSnapshotClass
|
||||
metadata:
|
||||
name: csi-rbdplugin-groupsnapclass
|
||||
driver: rbd.csi.ceph.com
|
||||
parameters:
|
||||
# String representing a Ceph cluster to provision storage from.
|
||||
# Should be unique across all Ceph clusters in use for provisioning,
|
||||
# cannot be greater than 36 bytes in length, and should remain immutable for
|
||||
# the lifetime of the StorageClass in use
|
||||
clusterID: <cluster-id>
|
||||
|
||||
# eg: pool: rbdpool
|
||||
pool: <rbd-pool-name>
|
||||
|
||||
csi.storage.k8s.io/group-snapshotter-secret-name: csi-rbd-secret
|
||||
csi.storage.k8s.io/group-snapshotter-secret-namespace: default
|
||||
deletionPolicy: Delete
|
@ -3,6 +3,8 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: rbd-pvc
|
||||
labels:
|
||||
group: test
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
Loading…
Reference in New Issue
Block a user