Skip to content

Commit

Permalink
added SC and Pool for RBD
Browse files Browse the repository at this point in the history
Signed-off-by: rakeshgm <[email protected]>
  • Loading branch information
rakeshgm committed Jan 23, 2025
1 parent acc70c7 commit 5e6476c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
File renamed without changes.
19 changes: 19 additions & 0 deletions test/addons/rook-pool/pool/replica-pool_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool_2
namespace: rook-ceph
spec:
replicated:
size: 1
requireSafeReplicaSize: false
mirroring:
enabled: true
mode: image
snapshotSchedules:
- interval: 3m
startTime: 14:00:00-05:00
File renamed without changes.
25 changes: 25 additions & 0 deletions test/addons/rook-pool/sc/storage-class_2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block_2
labels:
ramendr.openshift.io/storageid: rook-ceph-$cluster-1
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
clusterID: rook-ceph
pool: replicapool_2
imageFormat: "2"
imageFeatures: layering
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
csi.storage.k8s.io/fstype: ext4
reclaimPolicy: Delete
allowVolumeExpansion: true
8 changes: 6 additions & 2 deletions test/addons/rook-pool/start
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ from drenv import kubectl
def deploy(cluster):

print("Creating StorageClass")
template = drenv.template("storage-class.yaml")
scs = ["sc/storage-class.yaml", "sc/storage-class_2.yaml"]
for sc in range(scs):
template = drenv.template(sc)
yaml = template.substitute(cluster=cluster)
kubectl.apply("--filename=-", input=yaml, context=cluster)

print("Creating RBD pool")
kubectl.apply("--filename=replica-pool.yaml", context=cluster)
pools = ["pool/replica-pool.yaml", "pool/replica-pool_2.yaml"]
for pool in range(pool):
kubectl.apply("--filename=pool/replica-pool.yaml", context=cluster)

print("Creating SnapshotClass")
template = drenv.template("snapshot-class.yaml")
Expand Down

0 comments on commit 5e6476c

Please sign in to comment.