Skip to content

Commit

Permalink
external: fix rados namespace sc name
Browse files Browse the repository at this point in the history
Currently, the sc name is hardcoded,
in future if we support multiple rados
namespace per tenant we need a variable name
updating sc names to contain rados-namespace name
ocs pr: red-hat-storage/ocs-operator#2955

Signed-off-by: parth-gr <[email protected]>
(cherry picked from commit 61de34a)
  • Loading branch information
parth-gr committed Jan 10, 2025
1 parent 3b054c7 commit 7926041
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/examples/create-external-cluster-resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ def gen_json_out(self):
)
json_out.append(
{
"name": "ceph-rbd-rados-namespace",
"name": f"ceph-rbd-rados-namespace-{self.out_map['RADOS_NAMESPACE']}",
"kind": "StorageClass",
"data": {
"pool": self.out_map["RBD_POOL_NAME"],
Expand Down
2 changes: 2 additions & 0 deletions deploy/examples/import-external-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ function importClusterID() {
createRadosNamespaceCR
timeout 20 sh -c "until [ $($KUBECTL -n "$NAMESPACE" get CephBlockPoolRadosNamespace/"$RADOS_NAMESPACE" -o jsonpath='{.status.phase}' | grep -c "Ready") -eq 1 ]; do echo "waiting for radosNamespace to get created" && sleep 1; done"
CLUSTER_ID_RBD=$($KUBECTL -n "$NAMESPACE" get cephblockpoolradosnamespace.ceph.rook.io/"$RADOS_NAMESPACE" -o jsonpath='{.status.info.clusterID}')
RBD_STORAGE_CLASS_NAME=ceph-rbd-$RADOS_NAMESPACE
fi
if [ -n "$SUBVOLUME_GROUP" ]; then
createSubvolumeGroupCR
timeout 20 sh -c "until [ $($KUBECTL -n "$NAMESPACE" get CephFilesystemSubVolumeGroup/"$SUBVOLUME_GROUP" -o jsonpath='{.status.phase}' | grep -c "Ready") -eq 1 ]; do echo "waiting for radosNamespace to get created" && sleep 1; done"
CLUSTER_ID_CEPHFS=$($KUBECTL -n "$NAMESPACE" get cephfilesystemsubvolumegroup.ceph.rook.io/"$SUBVOLUME_GROUP" -o jsonpath='{.status.info.clusterID}')
CEPHFS_STORAGE_CLASS_NAME=cephfs-$SUBVOLUME_GROUP
fi
}

Expand Down

0 comments on commit 7926041

Please sign in to comment.