self._k8s,
cluster_name)
-
- # In case Rook isn't already clued in to this ceph
- # cluster's existence, initialize it.
- # self._rook_cluster.init_rook()
-
self._initialized.set()
while not self._shutdown.is_set():
# be formalized at some point)
return self.cluster_name
- def init_rook(self):
- """
- Create a passive Rook configuration for this Ceph cluster. This
- will prompt Rook to start watching for other resources within
- the cluster (e.g. Filesystem CRDs), but no other action will happen.
- """
-
- # TODO: complete or remove this functionality: if Rook wasn't
- # already running, then we would need to supply it with
- # keys and ceph.conf as well as creating the cluster CRD
-
- cluster_crd = {
- "apiVersion": ROOK_API_NAME,
- "kind": "CephCluster",
- "metadata": {
- "name": self.cluster_name,
- "namespace": self.cluster_name
- },
- "spec": {
- "backend": "ceph",
- "hostNetwork": True
- }
- }
-
- self.rook_api_post("cephclusters", body=cluster_crd)
-
def rook_url(self, path):
prefix = "/apis/ceph.rook.io/%s/namespaces/%s/" % (
ROOK_API_VERSION, self.rook_namespace)