@@ -12,16 +12,28 @@ import yaml
1212import drenv
1313from drenv import kubectl
1414
15+ POOL_NAMES = ["replicapool" , "replicapool-2" ]
16+
1517
1618def deploy (cluster ):
19+ scs = [
20+ {"name" : "rook-ceph-block" , "pool" : POOL_NAMES [0 ]},
21+ {"name" : "rook-ceph-block-2" , "pool" : POOL_NAMES [1 ]},
22+ ]
1723
1824 print ("Creating StorageClass" )
19- template = drenv .template ("storage-class.yaml" )
20- yaml = template .substitute (cluster = cluster )
21- kubectl .apply ("--filename=-" , input = yaml , context = cluster )
25+ for sc in scs :
26+ template = drenv .template ("storage-class.yaml" )
27+ yaml = template .substitute (
28+ cluster = cluster , name = sc .get ("name" ), pool = sc .get ("pool" )
29+ )
30+ kubectl .apply ("--filename=-" , input = yaml , context = cluster )
2231
2332 print ("Creating RBD pool" )
24- kubectl .apply ("--filename=replica-pool.yaml" , context = cluster )
33+ for pool in POOL_NAMES :
34+ template = drenv .template ("replica-pool.yaml" )
35+ yaml = template .substitute (cluster = cluster , name = pool )
36+ kubectl .apply ("--filename=-" , input = yaml , context = cluster )
2537
2638 print ("Creating SnapshotClass" )
2739 template = drenv .template ("snapshot-class.yaml" )
0 commit comments