diff --git a/dependencies/control-plane b/dependencies/control-plane index 99d6fa8cf..a160da43d 160000 --- a/dependencies/control-plane +++ b/dependencies/control-plane @@ -1 +1 @@ -Subproject commit 99d6fa8cf344432b9ebb0c49d68f01a1487e1f49 +Subproject commit a160da43d8012d318bda6e486d04c00d5d4a6913 diff --git a/k8s/supportability/src/collect/k8s_resources/client.rs b/k8s/supportability/src/collect/k8s_resources/client.rs index 968c50d26..2aa002bd4 100644 --- a/k8s/supportability/src/collect/k8s_resources/client.rs +++ b/k8s/supportability/src/collect/k8s_resources/client.rs @@ -97,6 +97,10 @@ impl ClientSet { pub(crate) fn kube_client(&self) -> kube::Client { self.client.clone() } + /// Get a reference to the namespace. + pub(crate) fn namespace(&self) -> &str { + &self.namespace + } /// Get a new api for a `dynamic_object` for the provided GVK. pub(crate) async fn dynamic_object_api( diff --git a/k8s/supportability/src/collect/persistent_store/etcd.rs b/k8s/supportability/src/collect/persistent_store/etcd.rs index badcac8cb..336c24c4b 100644 --- a/k8s/supportability/src/collect/persistent_store/etcd.rs +++ b/k8s/supportability/src/collect/persistent_store/etcd.rs @@ -21,9 +21,10 @@ impl EtcdStore { namespace: String, ) -> Result { let client_set = ClientSet::new(kube_config_path.clone(), namespace.clone()).await?; - let platform_info = platform::k8s::K8s::from(client_set.kube_client()) - .await - .map_err(|e| EtcdError::Custom(format!("Failed to get k8s platform info: {e}")))?; + let platform_info = + platform::k8s::K8s::from_custom(client_set.kube_client(), client_set.namespace()) + .await + .map_err(|e| EtcdError::Custom(format!("Failed to get k8s platform info: {e}")))?; let key_prefix = pstor::build_key_prefix(&platform_info, API_VERSION); // if an endpoint is provided it will be used, else the kubeconfig path will be used