Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding new SC and Pool for RBD #1756

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/addons/rook-pool/replica-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: ceph.rook.io/v1
kind: CephBlockPool
metadata:
name: replicapool
name: $name
namespace: rook-ceph
spec:
replicated:
Expand Down
28 changes: 20 additions & 8 deletions test/addons/rook-pool/start
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,28 @@ import yaml
import drenv
from drenv import kubectl

POOL_NAMES = ["replicapool", "replicapool-2"]

def deploy(cluster):

print("Creating StorageClass")
template = drenv.template("storage-class.yaml")
yaml = template.substitute(cluster=cluster)
kubectl.apply("--filename=-", input=yaml, context=cluster)

print("Creating RBD pool")
kubectl.apply("--filename=replica-pool.yaml", context=cluster)
def deploy(cluster):
storage_classes = [
{"name": "rook-ceph-block", "pool": POOL_NAMES[0]},
{"name": "rook-ceph-block-2", "pool": POOL_NAMES[1]},
]

print("Creating StorageClasses")
for storage_class in storage_classes:
template = drenv.template("storage-class.yaml")
yaml = template.substitute(
cluster=cluster, name=storage_class["name"], pool=storage_class["pool"]
)
kubectl.apply("--filename=-", input=yaml, context=cluster)

print("Creating RBD pools")
for pool in POOL_NAMES:
template = drenv.template("replica-pool.yaml")
yaml = template.substitute(cluster=cluster, name=pool)
kubectl.apply("--filename=-", input=yaml, context=cluster)

print("Creating SnapshotClass")
template = drenv.template("snapshot-class.yaml")
Expand Down
4 changes: 2 additions & 2 deletions test/addons/rook-pool/storage-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-block
name: $name
labels:
ramendr.openshift.io/storageid: rook-ceph-$cluster-1
provisioner: rook-ceph.rbd.csi.ceph.com
parameters:
clusterID: rook-ceph
pool: replicapool
pool: $pool
imageFormat: "2"
imageFeatures: layering
csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
Expand Down