We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f231c commit 30f6d96Copy full SHA for 30f6d96
1 file changed
rust/stackable-cockpit/src/utils/k8s/client.rs
@@ -574,16 +574,17 @@ impl Client {
574
575
/// Deletes a [`Namespace`] with `name` in the cluster.
576
pub async fn delete_namespace(&self, name: String) -> Result<()> {
577
- self.delete_object(
+ let namespace_api: Api<Namespace> = Api::all(self.client.clone());
578
+
579
+ kube::runtime::wait::delete::delete_and_finalize(
580
+ namespace_api,
581
&name,
- &ApiResource::from_gvk(&GroupVersionKind {
- group: "".to_owned(),
- version: "v1".to_owned(),
582
- kind: "Namespace".to_owned(),
583
- }),
584
- None,
+ &DeleteParams::foreground(),
585
)
586
.await
+ .context(KubeRuntimeDeleteSnafu)?;
587
+ Ok(())
588
}
589
590
/// Creates a [`Namespace`] only if not already present in the current cluster.
0 commit comments