Skip to content

Commit

Permalink
Adjust drenv to support consistency groups
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Gershkovich <elenage@il.ibm.com>
  • Loading branch information
ELENAGER authored and ShyamsundarR committed Sep 22, 2024
1 parent c0e382d commit 80fb919
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/addons/rbd-mirror/start
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ def deploy_vrc_sample(cluster):
)


def deploy_vgrc_sample(cluster):
print(f"Applying vgrc sample in cluster '{cluster}'")
kubectl.apply(
"--filename=vgrc-sample.yaml",
"--namespace=rook-ceph",
context=cluster,
)


if len(sys.argv) != 3:
print(f"Usage: {sys.argv[0]} cluster1 cluster2")
sys.exit(1)
Expand Down Expand Up @@ -268,4 +277,7 @@ wait_until_pool_mirroring_is_healthy(cluster2)
deploy_vrc_sample(cluster1)
deploy_vrc_sample(cluster2)

deploy_vgrc_sample(cluster1)
deploy_vgrc_sample(cluster2)

print("Mirroring was setup successfully")
17 changes: 17 additions & 0 deletions test/addons/rbd-mirror/vgr-sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeGroupReplication
metadata:
name: vgr-sample
spec:
volumeGroupReplicationClassName: vgrc-sample
replicationState: primary
source:
selector:
matchLabels:
appname: busybox
ramendr.openshift.io/consistency-group: rook-ceph-storage-id
autoResync: true
14 changes: 14 additions & 0 deletions test/addons/rbd-mirror/vgrc-sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeGroupReplicationClass
metadata:
name: vgrc-sample
spec:
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
replication.storage.openshift.io/replication-secret-name: rook-csi-rbd-provisioner
replication.storage.openshift.io/replication-secret-namespace: rook-ceph
schedulingInterval: 1m
2 changes: 2 additions & 0 deletions test/addons/rook-pool/storage-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block
labels:
ramendr.openshift.io/storageid: rook-ceph-storage-id
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
clusterID: rook-ceph
Expand Down

0 comments on commit 80fb919

Please sign in to comment.