11use serde:: { Deserialize , Serialize } ;
22use serde_yaml:: Mapping ;
33use snafu:: { OptionExt , ResultExt , Snafu } ;
4- use stackable_operator:: kube:: api:: { ApiResource , GroupVersionKind } ;
54use tracing:: { Span , debug, info, instrument, log:: warn} ;
65use tracing_indicatif:: span_ext:: IndicatifSpanExt as _;
76#[ cfg( feature = "openapi" ) ]
@@ -237,15 +236,7 @@ impl StackSpec {
237236
238237 // Delete stack namespace
239238 client
240- . delete_object (
241- & uninstall_parameters. stack_namespace ,
242- & ApiResource :: from_gvk ( & GroupVersionKind {
243- group : "" . to_owned ( ) ,
244- version : "v1" . to_owned ( ) ,
245- kind : "Namespace" . to_owned ( ) ,
246- } ) ,
247- None ,
248- )
239+ . delete_namespace ( uninstall_parameters. stack_namespace )
249240 . await
250241 . context ( DeleteObjectSnafu ) ?;
251242
@@ -265,15 +256,7 @@ impl StackSpec {
265256 . await ?;
266257
267258 client
268- . delete_object (
269- & uninstall_parameters. operator_namespace ,
270- & ApiResource :: from_gvk ( & GroupVersionKind {
271- group : "" . to_owned ( ) ,
272- version : "v1" . to_owned ( ) ,
273- kind : "Namespace" . to_owned ( ) ,
274- } ) ,
275- None ,
276- )
259+ . delete_namespace ( uninstall_parameters. operator_namespace )
277260 . await
278261 . context ( DeleteObjectSnafu ) ?;
279262 }
0 commit comments