@@ -8,7 +8,10 @@ use utoipa::ToSchema;
88
99use crate :: {
1010 helm,
11- platform:: { operator, product} ,
11+ platform:: {
12+ operator:: { self , OperatorSpec } ,
13+ product,
14+ } ,
1215} ;
1316
1417type Result < T , E = Error > = std:: result:: Result < T , E > ;
@@ -52,10 +55,10 @@ impl ReleaseSpec {
5255 info ! ( "Installing release" ) ;
5356
5457 for ( product_name, product) in self . filter_products ( include_products, exclude_products) {
55- info ! ( "Installing product {}" , product_name ) ;
58+ info ! ( "Installing {product_name}-operator" ) ;
5659
5760 // Create operator spec
58- let operator = operator :: OperatorSpec :: new ( product_name, Some ( product. version . clone ( ) ) )
61+ let operator = OperatorSpec :: new ( product_name, Some ( product. version . clone ( ) ) )
5962 . context ( OperatorSpecParseSnafu ) ?;
6063
6164 // Install operator
@@ -65,9 +68,20 @@ impl ReleaseSpec {
6568 Ok ( ( ) )
6669 }
6770
71+ #[ instrument( skip_all) ]
6872 pub fn uninstall ( & self , namespace : & str ) -> Result < ( ) > {
69- for ( product_name, _) in & self . products {
70- helm:: uninstall_release ( product_name, namespace, true ) . context ( HelmUninstallSnafu ) ?;
73+ info ! ( "Uninstalling release" ) ;
74+
75+ for ( product_name, product_spec) in & self . products {
76+ info ! ( "Uninstalling {product_name}-operator" ) ;
77+
78+ // Create operator spec
79+ let operator = OperatorSpec :: new ( product_name, Some ( product_spec. version . clone ( ) ) )
80+ . context ( OperatorSpecParseSnafu ) ?;
81+
82+ // Uninstall operator
83+ helm:: uninstall_release ( & operator. helm_name ( ) , namespace, true )
84+ . context ( HelmUninstallSnafu ) ?;
7185 }
7286
7387 Ok ( ( ) )
0 commit comments