]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: fixing the namespaces used to access some resources/config 54151/head
authorRedouane Kachach <rkachach@redhat.com>
Tue, 24 Oct 2023 12:06:41 +0000 (14:06 +0200)
committerRedouane Kachach <rkachach@redhat.com>
Tue, 24 Oct 2023 12:06:41 +0000 (14:06 +0200)
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
src/pybind/mgr/rook/rook_cluster.py

index 8f7ac34931470cc58d17ab559bf053cc7a1206e7..f455581656e0d969bbb0236b2b8bf2957f78bc52 100644 (file)
@@ -226,7 +226,7 @@ class PDFetcher(DefaultFetcher):
     def fetch(self) -> None:
         """ Collect the devices information from k8s configmaps"""
         self.dev_cms: KubernetesResource = KubernetesResource(self.coreV1_api.list_namespaced_config_map,
-                                                              namespace=self.rook_env.namespace,
+                                                              namespace=self.rook_env.operator_namespace,
                                                               label_selector='app=rook-discover')
 
     def devices(self) -> Dict[str, List[Device]]:
@@ -760,7 +760,7 @@ class RookCluster(object):
 
     def get_discovered_devices(self, nodenames: Optional[List[str]] = None) -> Dict[str, List[Device]]:
         self.fetcher: Optional[DefaultFetcher] = None
-        op_settings = self.coreV1_api.read_namespaced_config_map(name="rook-ceph-operator-config", namespace=self.rook_env.namespace).data
+        op_settings = self.coreV1_api.read_namespaced_config_map(name="rook-ceph-operator-config", namespace=self.rook_env.operator_namespace).data
         if op_settings.get('ROOK_ENABLE_DISCOVERY_DAEMON', 'false').lower() == 'true':
             self.fetcher = PDFetcher(self.coreV1_api, self.rook_env)
         else: