From cb4b33d5a76b76a1eb9a7812f0a6b413bd597468 Mon Sep 17 00:00:00 2001 From: Nikhil-Ladha Date: Thu, 25 Jul 2024 16:01:45 +0530 Subject: [PATCH] docs: add docs for volumegroupreplication CR add docs for volumegroupreplication and volumegroupreplicationclass CRs. Signed-off-by: Nikhil-Ladha --- docs/volumegroupreplication.md | 38 +++++++++++++++++++++++++++ docs/volumegroupreplicationclass.md | 24 +++++++++++++++++ docs/volumegroupreplicationcontent.md | 31 ++++++++++++++++++++++ docs/volumereplicationclass.md | 2 +- 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 docs/volumegroupreplication.md create mode 100644 docs/volumegroupreplicationclass.md create mode 100644 docs/volumegroupreplicationcontent.md diff --git a/docs/volumegroupreplication.md b/docs/volumegroupreplication.md new file mode 100644 index 000000000..81fc39f27 --- /dev/null +++ b/docs/volumegroupreplication.md @@ -0,0 +1,38 @@ +# VolumeGroupReplication + +VolumeGroupReplication is a namespaced resource that contains references to storage object to be grouped and replicated, VolumeGroupReplicationClass corresponding to the driver providing replication, VolumeGroupContent and VolumeReplication CRs. + +`volumeGroupReplicationClassName` is the name of the class providing group replication. + +`volumeReplicationClassName` is the name of the class providing the replication for volumeReplication CR. + +`volumeReplicationName` is the name of the volumeReplication CR created by this volumeGroupReplication CR + +`volumeGroupReplicationContentName` is the name of the volumeGroupReplicationConten CR created by this volumeGroupReplication CR. + +`replicationState` is the state of the volume being referenced. Possible values are `primary`, `secondary` and `resync`. + ++ `primary` denotes that the volume is primary ++ `secondary` denotes that the volume is secondary ++ `resync` denotes that the volume needs to be resynced + +`source` contains the source of the volumeGroupReplication i.e, the selectors to match the PVC/PVs to be replicated. + ++ `selector` is a label selector to filter the pvcs that are to be included in the group replication + + +``` yaml +apiVersion: replication.storage.openshift.io/v1alpha1 +kind: VolumeGroupReplication +metadata: + name: volumegroupreplication-sample + namespace: default +spec: + volumeReplicationClassName: volumereplicationclass-sample + volumeGroupReplicationClassName: volumegroupreplicationclass-sample + replicationState: primary + source: + selector: + matchLabels: + group: replication +``` diff --git a/docs/volumegroupreplicationclass.md b/docs/volumegroupreplicationclass.md new file mode 100644 index 000000000..c2cf31d1b --- /dev/null +++ b/docs/volumegroupreplicationclass.md @@ -0,0 +1,24 @@ +# VolumeGroupReplicationClass + +VolumeGroupReplicationClass is a cluster scoped resource that contains driver related configuration parameters for volume group replication. + +`provisioner` is name of the storage provisioner. + +`parameters` contains key-value pairs that are passed down to the driver. Users can add their own key-value pairs. Keys with `replication.storage.openshift.io/` prefix are reserved by operator and not passed down to the driver. + +## Reserved parameter keys + ++ `replication.storage.openshift.io/group-replication-secret-name` ++ `replication.storage.openshift.io/group-replication-secret-namespace` + +``` yaml +apiVersion: replication.storage.openshift.io/v1alpha1 +kind: VolumeGroupReplicationClass +metadata: + name: volumegroupreplicationclass-sample +spec: + provisioner: example.provisioner.io + parameters: + replication.storage.openshift.io/group-replication-secret-name: secret-name + replication.storage.openshift.io/group-replication-secret-namespace: secret-namespace +``` diff --git a/docs/volumegroupreplicationcontent.md b/docs/volumegroupreplicationcontent.md new file mode 100644 index 000000000..292667959 --- /dev/null +++ b/docs/volumegroupreplicationcontent.md @@ -0,0 +1,31 @@ +# VolumeGroupReplicationContent + +VolumeGroupReplicationContent is a cluster scoped resource that contains volume grouping related information. + +`volumeGroupReplicationRef` contains object reference of the volumeGroupReplication resource that created this resource. + +`volumeGroupReplicationHandle` (optional) is an existing (but new) group replication ID. + +`volumeGroupReplicationClassName` is the name of the VolumeGroupReplicationClass that contains the driver related info +for volume grouping. + +`source` (optional) contains the VolumeGroupReplicationContentSource struct. + ++ `VolumeHandles` is the list of volume handles that this resource is responsible for grouping. + +``` yaml +apiVersion: replication.storage.openshift.io/v1alpha1 +kind: VolumeGroupReplicationContent +metadata: + name: volumegroupreplicationcontent-sample +spec: + volumeGroupReplicationRef: + kind: VolumeGroupReplication + name: volumegroupreplication-sample + namespace: default + volumeGroupReplicationClassName: volumegroupreplicationclass-sample + provisioner: example.provisioner.io + source: + volumeHandles: + - myPersistentVolumeHandle +``` diff --git a/docs/volumereplicationclass.md b/docs/volumereplicationclass.md index 670439652..d032f9455 100644 --- a/docs/volumereplicationclass.md +++ b/docs/volumereplicationclass.md @@ -1,6 +1,6 @@ # VolumeReplicationClass -`VolumeReplicationClass` is a cluster scoped resource that contains driver related configuration parameters. +VolumeReplicationClass is a cluster scoped resource that contains driver related configuration parameters. `provisioner` is name of the storage provisioner.