99use std:: { num:: ParseIntError , str:: FromStr } ;
1010
1111use snafu:: { OptionExt , ResultExt , Snafu } ;
12- use stackable_operator:: {
13- client:: Client ,
14- kube:: runtime:: reflector:: ObjectRef ,
15- } ;
12+ use stackable_operator:: { client:: Client , kube:: runtime:: reflector:: ObjectRef } ;
1613use strum:: { EnumDiscriminants , IntoStaticStr } ;
1714
1815use crate :: {
@@ -24,8 +21,7 @@ use crate::{
2421 } ,
2522 crd:: {
2623 authentication:: { ResolvedAuthenticationClassRef , resolve_authentication_classes} ,
27- catalog,
28- v1alpha1,
24+ catalog, v1alpha1,
2925 } ,
3026} ;
3127
@@ -110,10 +106,9 @@ pub async fn dereference(
110106 . context ( GetCatalogsSnafu ) ?;
111107
112108 let raw_product_version = trino. spec . image . product_version ( ) ;
113- let product_version =
114- u16:: from_str ( raw_product_version) . context ( ParseTrinoVersionSnafu {
115- product_version : raw_product_version,
116- } ) ?;
109+ let product_version = u16:: from_str ( raw_product_version) . context ( ParseTrinoVersionSnafu {
110+ product_version : raw_product_version,
111+ } ) ?;
117112
118113 let mut catalogs = Vec :: with_capacity ( catalog_definitions. len ( ) ) ;
119114 for catalog in & catalog_definitions {
@@ -144,19 +139,14 @@ pub async fn dereference(
144139 None => None ,
145140 } ;
146141
147- let resolved_client_protocol_config =
148- match trino. spec . cluster_config . client_protocol . as_ref ( ) {
149- Some ( spooling_config) => Some (
150- ResolvedClientProtocolConfig :: from_config (
151- spooling_config,
152- Some ( client) ,
153- namespace,
154- )
142+ let resolved_client_protocol_config = match trino. spec . cluster_config . client_protocol . as_ref ( ) {
143+ Some ( spooling_config) => Some (
144+ ResolvedClientProtocolConfig :: from_config ( spooling_config, Some ( client) , namespace)
155145 . await
156146 . context ( ClientProtocolConfigurationSnafu ) ?,
157- ) ,
158- None => None ,
159- } ;
147+ ) ,
148+ None => None ,
149+ } ;
160150
161151 Ok ( DereferencedObjects {
162152 resolved_authentication_classes,
0 commit comments